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.
168 169 170 171 172 173 174 |
# File 'lib/ab_admin/config/base.rb', line 168 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.
166 167 168 |
# File 'lib/ab_admin/config/base.rb', line 166 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
166 167 168 |
# File 'lib/ab_admin/config/base.rb', line 166 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
166 167 168 |
# File 'lib/ab_admin/config/base.rb', line 166 def @options end |
Instance Method Details
#collection? ⇒ Boolean
176 177 178 |
# File 'lib/ab_admin/config/base.rb', line 176 def collection? [:collection] end |