Class: Symbol
- Inherits:
-
Object
- Object
- Symbol
- Defined in:
- lib/clir/Symbol.ext.rb
Instance Method Summary collapse
- #camelize ⇒ Object
-
#in?(ary) ⇒ Boolean
TRUE if self is inside
ary
or has key self.
Instance Method Details
#camelize ⇒ Object
16 17 18 |
# File 'lib/clir/Symbol.ext.rb', line 16 def camelize self.to_s.camelize end |
#in?(ary) ⇒ Boolean
Returns TRUE if self is inside ary
or has key self.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/clir/Symbol.ext.rb', line 5 def in?(ary) case ary when Array ary.include?(self) when Hash ary.key?(self) else raise "Symbol#in? waits for a Array or an Hash. Given: #{ary.class}." end end |