Class: Vident::StimulusValue
- Inherits:
-
StimulusAttributeBase
- Object
- StimulusAttributeBase
- Vident::StimulusValue
- Defined in:
- lib/vident/stimulus_value.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#value_name ⇒ Object
readonly
Returns the value of attribute value_name.
Attributes inherited from StimulusAttributeBase
Instance Method Summary collapse
Methods inherited from StimulusAttributeBase
#implied_controller_name, #implied_controller_path, #initialize, #inspect, #to_h
Constructor Details
This class inherits a constructor from Vident::StimulusAttributeBase
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
7 8 9 |
# File 'lib/vident/stimulus_value.rb', line 7 def controller @controller end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/vident/stimulus_value.rb', line 7 def value @value end |
#value_name ⇒ Object (readonly)
Returns the value of attribute value_name.
7 8 9 |
# File 'lib/vident/stimulus_value.rb', line 7 def value_name @value_name end |
Instance Method Details
#data_attribute_name ⇒ Object
13 14 15 |
# File 'lib/vident/stimulus_value.rb', line 13 def data_attribute_name "#{@controller}-#{@value_name}-value" end |
#data_attribute_value ⇒ Object
17 18 19 |
# File 'lib/vident/stimulus_value.rb', line 17 def data_attribute_value @value end |
#to_s ⇒ Object
9 10 11 |
# File 'lib/vident/stimulus_value.rb', line 9 def to_s @value.to_s end |