Class: Representable::Config

Inherits:
Array
  • Object
show all
Includes:
InheritMethods, InheritableArray
Defined in:
lib/representable/config.rb

Overview

NOTE: the API of Config is subject to change so don’t rely too much on this private object.

Defined Under Namespace

Modules: InheritMethods, InheritableArray

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from InheritableArray

#inherit, #inheritable_array, #inheritable_arrays

Methods included from InheritMethods

#clone, #inherit

Instance Attribute Details

#wrapObject

Returns the value of attribute wrap.



23
24
25
# File 'lib/representable/config.rb', line 23

def wrap
  @wrap
end

Instance Method Details

#wrap_for(name) ⇒ Object

Computes the wrap string or returns false.



26
27
28
29
30
# File 'lib/representable/config.rb', line 26

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