Class: Line::Bot::MessageBuilder::Message::Text

Inherits:
Line::Bot::MessageBuilder::Message show all
Defined in:
lib/line/bot/message_builder/messages/text.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_h

Constructor Details

#initialize(text: nil) ⇒ Text



7
8
9
10
11
12
# File 'lib/line/bot/message_builder/messages/text.rb', line 7

def initialize(text: nil)
  super 'text' do
    @text = text
    yield self if block_given?
  end
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



5
6
7
# File 'lib/line/bot/message_builder/messages/text.rb', line 5

def text
  @text
end

Class Method Details

.requiredObject



14
15
16
17
18
19
# File 'lib/line/bot/message_builder/messages/text.rb', line 14

def self.required
  {
    'type' => String,
    'text' => String
  }
end