Class: Rubord::Components::BaseComponent

Inherits:
Object
  • Object
show all
Defined in:
lib/rubord/components/containers/base.rb

Direct Known Subclasses

Container, Section, Separator, Text

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typeObject (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_hObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/rubord/components/containers/base.rb', line 10

def to_h
  raise NotImplementedError, "Implement to_h in subclass"
end