Sha256: 3e44baef5a35551d7a04c7d0091c3d58ba18867b143630e054b7c4dab552cc93
Contents?: true
Size: 669 Bytes
Versions: 54
Compression:
Stored size: 669 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, @block = options, block end def [](key) @options[key] end end end
Version data entries
54 entries across 54 versions & 6 rubygems