Class: Representable::Config
- Inherits:
-
Array
- Object
- Array
- Representable::Config
- Defined in:
- lib/representable.rb
Overview
NOTE: the API of Config is subject to change so don’t rely too much on this private object.
Instance Attribute Summary collapse
-
#wrap ⇒ Object
Returns the value of attribute wrap.
Instance Method Summary collapse
- #clone ⇒ Object
- #inherit(parent) ⇒ Object
-
#wrap_for(name) ⇒ Object
Computes the wrap string or returns false.
Instance Attribute Details
#wrap ⇒ Object
Returns the value of attribute wrap.
217 218 219 |
# File 'lib/representable.rb', line 217 def wrap @wrap end |
Instance Method Details
#clone ⇒ Object
226 227 228 |
# File 'lib/representable.rb', line 226 def clone self.class.new(collect { |d| d.clone }) end |
#inherit(parent) ⇒ Object
230 231 232 |
# File 'lib/representable.rb', line 230 def inherit(parent) push(*parent.clone) end |
#wrap_for(name) ⇒ Object
Computes the wrap string or returns false.
220 221 222 223 224 |
# File 'lib/representable.rb', line 220 def wrap_for(name) return unless wrap return infer_name_for(name) if wrap === true wrap end |