Class: AbAdmin::Config::BatchAction
- 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.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #confirm ⇒ Object
-
#initialize(name, options = {}, &block) ⇒ BatchAction
constructor
A new instance of BatchAction.
Constructor Details
#initialize(name, options = {}, &block) ⇒ BatchAction
Returns a new instance of BatchAction.
105 106 107 108 109 110 |
# File 'lib/ab_admin/config/base.rb', line 105 def initialize(name, ={}, &block) @name = name @options = @title = [:title] || I18n.t("admin.actions.batch_#{name}.link") @data = block_given? ? block : name.to_sym end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
103 104 105 |
# File 'lib/ab_admin/config/base.rb', line 103 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
103 104 105 |
# File 'lib/ab_admin/config/base.rb', line 103 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
103 104 105 |
# File 'lib/ab_admin/config/base.rb', line 103 def @options end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
103 104 105 |
# File 'lib/ab_admin/config/base.rb', line 103 def title @title end |
Instance Method Details
#confirm ⇒ Object
112 113 114 |
# File 'lib/ab_admin/config/base.rb', line 112 def confirm [:confirm] end |