Module: Representable::Represent

Defined in:
lib/representable/represent.rb

Instance Method Summary collapse

Instance Method Details

#represent(represented, array_class = Array) ⇒ Object



2
3
4
5
6
# File 'lib/representable/represent.rb', line 2

def represent(represented, array_class=Array)
  return for_collection.prepare(represented) if represented.is_a?(array_class)

  prepare(represented)
end