class ActiveAdmin::PagePresenter

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

Attributes

block[R]
options[R]

Public Class Methods

new(options = {}, &block) click to toggle source
# File lib/active_admin/page_presenter.rb, line 24
def initialize(options = {}, &block)
  @options = options
  @block = block
end

Public Instance Methods

[](key) click to toggle source
# File lib/active_admin/page_presenter.rb, line 29
def [](key)
  @options[key]
end