Class: AbAdmin::Config::ActionItem

Inherits:
Object
  • Object
show all
Includes:
OptionalDisplay
Defined in:
lib/ab_admin/config/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from OptionalDisplay

#for_action?, #for_context?

Constructor Details

#initialize(options = {}, &block) ⇒ ActionItem

Returns a new instance of ActionItem



135
136
137
138
139
140
# File 'lib/ab_admin/config/base.rb', line 135

def initialize(options={}, &block)
  raise 'Can not create action item without a block' unless block_given?
  @options = options
  @data = block
  normalize_display_options!
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data



133
134
135
# File 'lib/ab_admin/config/base.rb', line 133

def data
  @data
end

#optionsObject (readonly)

Returns the value of attribute options



133
134
135
# File 'lib/ab_admin/config/base.rb', line 133

def options
  @options
end