Class: Representable::Config
- Inherits:
-
Array
- Object
- Array
- Representable::Config
- Defined in:
- lib/representable.rb
Instance Attribute Summary collapse
-
#wrap ⇒ Object
Returns the value of attribute wrap.
Instance Method Summary collapse
- #clone ⇒ Object
-
#wrap_for(name) ⇒ Object
Computes the wrap string or returns false.
Instance Attribute Details
#wrap ⇒ Object
Returns the value of attribute wrap.
198 199 200 |
# File 'lib/representable.rb', line 198 def wrap @wrap end |
Instance Method Details
#clone ⇒ Object
207 208 209 |
# File 'lib/representable.rb', line 207 def clone self.class.new(collect { |d| d.clone }) end |
#wrap_for(name) ⇒ Object
Computes the wrap string or returns false.
201 202 203 204 205 |
# File 'lib/representable.rb', line 201 def wrap_for(name) return unless wrap return infer_name_for(name) if wrap === true wrap end |