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.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#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.
115 116 117 118 119 120 121 122 123 |
# File 'lib/ab_admin/config/base.rb', line 115 def initialize(name, ={}, &block) @name = name @options = if .has_key?(:form) @form = [:form].is_a?(String) ? [:form] : "##{name}_batch_form" end @title = [:title] || I18n.t("admin.actions.batch_#{name}.link", default: name.to_s.humanize) @data = block_given? ? block : name.to_sym end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
113 114 115 |
# File 'lib/ab_admin/config/base.rb', line 113 def data @data end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
113 114 115 |
# File 'lib/ab_admin/config/base.rb', line 113 def form @form end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
113 114 115 |
# File 'lib/ab_admin/config/base.rb', line 113 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
113 114 115 |
# File 'lib/ab_admin/config/base.rb', line 113 def @options end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
113 114 115 |
# File 'lib/ab_admin/config/base.rb', line 113 def title @title end |
Instance Method Details
#confirm ⇒ Object
125 126 127 |
# File 'lib/ab_admin/config/base.rb', line 125 def confirm [:confirm] end |