Module: Exhibit::Helpers
- Defined in:
- lib/exhibit/helpers.rb
Instance Method Summary collapse
Instance Method Details
#exhibit(object, klass = nil) {|presenter| ... } ⇒ Object
3 4 5 6 7 8 |
# File 'lib/exhibit/helpers.rb', line 3 def exhibit(object, klass = nil) klass ||= "#{object.class}Presenter".constantize presenter = klass.new(object, self) yield presenter if block_given? presenter end |