Class: Warb::Components::Row

Inherits:
Object
  • Object
show all
Defined in:
lib/warb/components/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title: nil, description: nil) ⇒ Row

Returns a new instance of Row.



8
9
10
11
# File 'lib/warb/components/action.rb', line 8

def initialize(title: nil, description: nil)
  @title = title
  @description = description
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/warb/components/action.rb', line 6

def description
  @description
end

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/warb/components/action.rb', line 6

def title
  @title
end

Instance Method Details

#to_hObject



13
14
15
16
17
18
# File 'lib/warb/components/action.rb', line 13

def to_h
  {
    title: @title,
    description: @description
  }
end