Class: AbAdmin::Config::CustomAction
- Includes:
- OptionalDisplay
- Defined in:
- lib/ab_admin/config/base.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #collection? ⇒ Boolean
-
#initialize(name, options = {}, &block) ⇒ CustomAction
constructor
A new instance of CustomAction.
Methods included from OptionalDisplay
Constructor Details
#initialize(name, options = {}, &block) ⇒ CustomAction
Returns a new instance of CustomAction.
150 151 152 153 154 155 156 |
# File 'lib/ab_admin/config/base.rb', line 150 def initialize(name, ={}, &block) raise 'Can not create member action without a block' unless block_given? @name = name @options = @data = block end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
148 149 150 |
# File 'lib/ab_admin/config/base.rb', line 148 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
148 149 150 |
# File 'lib/ab_admin/config/base.rb', line 148 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
148 149 150 |
# File 'lib/ab_admin/config/base.rb', line 148 def @options end |
Instance Method Details
#collection? ⇒ Boolean
158 159 160 |
# File 'lib/ab_admin/config/base.rb', line 158 def collection? [:collection] end |