Module: Hugger::Huggable
- Defined in:
- lib/hugger/huggable.rb
Overview
String
Class Method Summary collapse
Instance Method Summary collapse
-
#hug(value) ⇒ Object
Decorates the object using the Hugger classes.
Class Method Details
.included(klass) ⇒ Object
5 6 7 8 |
# File 'lib/hugger/huggable.rb', line 5 def self.included(klass) super klass.extend(ClassMethods) end |
Instance Method Details
#hug(value) ⇒ Object
Decorates the object using the Hugger classes
12 13 14 15 16 17 |
# File 'lib/hugger/huggable.rb', line 12 def hug(value) case value when ::String, String Hugger::String.new(value) end end |