Sha256: dc3827b0e3fbc77046e1fa2d7ef5fd597ca37535fe63216c2433d15bab0df9d2
Contents?: true
Size: 667 Bytes
Versions: 59
Compression:
Stored size: 667 Bytes
Contents
module ActiveAdmin # A simple object that gets used to present different aspects of views # # Initialize with a set of options and a block. The options become # available using hash style syntax. # # Usage: # # presenter = PagePresenter.new :as => :table do # # some awesome stuff # end # # presenter[:as] #=> :table # presenter.block #=> The block passed in to new # class PagePresenter attr_reader :block, :options delegate :has_key?, :to => :options def initialize(options = {}, &block) @options, @block = options, block end def [](key) @options[key] end end end
Version data entries
59 entries across 59 versions & 4 rubygems