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