Class: Symbol

Inherits:
Object show all
Defined in:
lib/core/symbol.rb

Instance Method Summary collapse

Instance Method Details

#/(o) ⇒ String

Returns The original path concatenated with o.

Examples:

:merb/"core_ext" #=> "merb/core_ext"

Parameters:

  • o (String, Symbol)

    The path component to join with the string.

Returns:

  • (String)

    The original path concatenated with o.



21
22
23
# File 'lib/core/symbol.rb', line 21

def /(o)
  File.join(self.to_s, o.to_s)
end

#<=>(b) ⇒ Object



11
12
13
# File 'lib/core/symbol.rb', line 11

def <=>(b)
  "#{self}" <=> "#{b}"
end

#classifyObject

Classify the symbol



26
27
28
# File 'lib/core/symbol.rb', line 26

def classify
  to_s.classify.to_sym
end

#sanitizeObject

def >(num);“#self > #num”;end def <(num);“#self < #num”;end def >=(num);“#self >= #num”;end def <=(num);“#self <= #num”;end def ==(num);“#self > #num”;end



8
9
10
# File 'lib/core/symbol.rb', line 8

def sanitize
  self.to_s.sanitize
end