Class: ActionView::Helpers::AttributeBuilders::Submit

Inherits:
Object
  • Object
show all
Includes:
Submittable
Defined in:
lib/actionview_attribute_builders/attribute_builders/submit.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = nil, options = {}, object, object_name) ⇒ Submit

Returns a new instance of Submit.



12
13
14
15
16
17
18
19
20
# File 'lib/actionview_attribute_builders/attribute_builders/submit.rb', line 12

def initialize(value = nil, options = {}, object, object_name)
  @object_name = object_name
  @object = object
  @value = value
  @options = options

  @value, @options = nil, @value if @value.is_a?(Hash)
  @value ||= submit_default_value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



10
11
12
# File 'lib/actionview_attribute_builders/attribute_builders/submit.rb', line 10

def value
  @value
end

Instance Method Details

#html_attributesObject



22
23
24
# File 'lib/actionview_attribute_builders/attribute_builders/submit.rb', line 22

def html_attributes
  @options
end