Class: AbAdmin::Config::BatchAction

Inherits:
Object
  • Object
show all
Defined in:
lib/ab_admin/config/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}, &block) ⇒ BatchAction


113
114
115
116
117
118
# File 'lib/ab_admin/config/base.rb', line 113

def initialize(name, options={}, &block)
  @name = name
  @options = options
  @title = options[:title] || I18n.t("admin.actions.batch_#{name}.link")
  @data = block_given? ? block : name.to_sym
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data


111
112
113
# File 'lib/ab_admin/config/base.rb', line 111

def data
  @data
end

#nameObject (readonly)

Returns the value of attribute name


111
112
113
# File 'lib/ab_admin/config/base.rb', line 111

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options


111
112
113
# File 'lib/ab_admin/config/base.rb', line 111

def options
  @options
end

#titleObject (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

#confirmObject


120
121
122
# File 'lib/ab_admin/config/base.rb', line 120

def confirm
  options[:confirm]
end