Class: Representable::Config

Inherits:
Array
  • Object
show all
Defined in:
lib/representable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#wrapObject

Returns the value of attribute wrap.



144
145
146
# File 'lib/representable.rb', line 144

def wrap
  @wrap
end

Instance Method Details

#wrap_for(name) ⇒ Object

Computes the wrap string or returns false.



147
148
149
150
151
# File 'lib/representable.rb', line 147

def wrap_for(name)
  return unless wrap
  return infer_name_for(name) if wrap === true
  wrap
end