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.



198
199
200
# File 'lib/representable.rb', line 198

def wrap
  @wrap
end

Instance Method Details

#cloneObject



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