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.
113 114 115 116 117 118 |
# File 'lib/ab_admin/config/base.rb', line 113 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.
111 112 113 |
# File 'lib/ab_admin/config/base.rb', line 111 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
111 112 113 |
# File 'lib/ab_admin/config/base.rb', line 111 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
111 112 113 |
# File 'lib/ab_admin/config/base.rb', line 111 def @options end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
111 112 113 |
# File 'lib/ab_admin/config/base.rb', line 111 def title @title end |
Instance Method Details
#confirm ⇒ Object
120 121 122 |
# File 'lib/ab_admin/config/base.rb', line 120 def confirm [:confirm] end |