Class: Symbol

Inherits:
Object show all
Includes:
Comparable
Defined in:
lib/csl/compatibility.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



5
6
7
8
# File 'lib/csl/compatibility.rb', line 5

def <=>(other)
  return unless other.kind_of?(Symbol)
  to_s <=> other.to_s
end

#match(pattern) ⇒ Object Also known as: =~



10
11
12
# File 'lib/csl/compatibility.rb', line 10

def match(pattern)
  to_s.match(pattern)
end