Class: Rubord::Components::BaseComponent
- Inherits:
-
Object
- Object
- Rubord::Components::BaseComponent
- Defined in:
- lib/rubord/components/containers/base.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type) ⇒ BaseComponent
constructor
A new instance of BaseComponent.
- #to_h ⇒ Object
Constructor Details
#initialize(type) ⇒ BaseComponent
Returns a new instance of BaseComponent.
6 7 8 |
# File 'lib/rubord/components/containers/base.rb', line 6 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/rubord/components/containers/base.rb', line 4 def type @type end |
Instance Method Details
#to_h ⇒ Object
10 11 12 |
# File 'lib/rubord/components/containers/base.rb', line 10 def to_h raise NotImplementedError, "Implement to_h in subclass" end |