### Home Classes Methods

### In Files

- lib/facets/opesc.rb

### Methods

- ::escape
- ::method_to_filename

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Random
- Random::ArrayExtensions
- Random::HashExtensions
- Random::IntegerExtensions
- Random::NumericExtensions
- Random::RangeExtensions
- Random::StringExtensions
- Random::StringExtensions::Self
- FileUtils
- FileUtils::DryRun
- FileUtils::NoWrite
- FileUtils::Verbose
- Digest
- Digest::Class
- Digest::Instance
- Multiton
- Multiton::Inclusive
- Multiton::MetaMethods
- URI
- URI::Hash
- URI::Kernel
- Argvector
- Argvector
- ERB
- ERB::OpenTemplate
- Enumerable
- Enumerable::Arguments
- GetoptLong
- GetoptLong::DSL
- Memoizable
- Memoizable::Copy
- Numeric
- Numeric::Multipliers
- Object
- Object::ArgVector
- Timer
- Timer::Dummy
- Array
- BasicObject
- CGI
- Cloneable
- Continuation
- Date
- DateTime
- Equitable
- File
- Find
- Hash
- Instantiable
- Integer
- Interval
- Kernel
- Math
- Module
- Net
- NilClass
- NullClass
- OpEsc
- OpenStruct
- Pathname
- Platform
- Range
- RbConfig
- Set
- Shellwords
- String
- StringScanner
- Time
- Tuple
- YAML
- Zlib

No matching classes.

# OpEsc

NOTE: As of v3.0 of Facets these have been renamed:

    op_plus_self   -> op_plus
    op_minus_self  -> op_minus
    op_plus        -> op_add
    op_minus       -> op_sub
    op_case_eq     -> op_case

TODO: In the future we might also rename:

    op_lshift      -> op_push
    op_rshift      -> op_pull
    op_store       -> op_index
    op_fetch       -> op_index  (b/c [] and []= in same file)

### Constants

OPERATORS
OPERATORS_ESC_TABLE
OPERATORS_REGEXP

### Public Class Methods

escape(str) click to toggle source

Applies operator escape's according to OPERATORS_ESCAPE_TABLE.

    OpEsc.escape('-') #=> "op_sub"

CREDIT: Trans

    # File lib/facets/opesc.rb, line 55
    def self.escape(str)
      str.to_s.gsub(OPERATORS_REGEXP){ OPERATORS_ESC_TABLE[$1] }
    end

method_to_filename(name) click to toggle source

    # File lib/facets/opesc.rb, line 60
    def self.method_to_filename(name)
      fname = escape(name)
      fname = fname[0...-1] if fname =~ /[\!\=\?]$/
      fname
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.