Class: Sandals::Button
- Inherits:
-
Object
- Object
- Sandals::Button
- Includes:
- Actionable
- Defined in:
- lib/sandals/view.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #activate ⇒ Object
-
#initialize(id, content, action:) ⇒ Button
constructor
A new instance of Button.
Constructor Details
#initialize(id, content, action:) ⇒ Button
Returns a new instance of Button.
481 482 483 484 485 |
# File 'lib/sandals/view.rb', line 481 def initialize(id, content, action:) @id = id @content = content.to_s @action = action end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
479 480 481 |
# File 'lib/sandals/view.rb', line 479 def content @content end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
479 480 481 |
# File 'lib/sandals/view.rb', line 479 def id @id end |
Instance Method Details
#activate ⇒ Object
487 488 489 |
# File 'lib/sandals/view.rb', line 487 def activate execute_action end |