Sha256: 7c7abc8efbcf82cfdd8bd789a7d1d9cf42c7f014cafd13d35d134de4234c349f
Contents?: true
Size: 675 Bytes
Versions: 13
Compression:
Stored size: 675 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?, :fetch, to: :options def initialize(options = {}, &block) @options = options @block = block end def [](key) @options[key] end end end
Version data entries
13 entries across 13 versions & 2 rubygems