Class: Teams::Api::TypingActivity

Inherits:
Object
  • Object
show all
Defined in:
lib/teams/api/typing_activity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text = nil) ⇒ TypingActivity

Returns a new instance of TypingActivity.



8
9
10
# File 'lib/teams/api/typing_activity.rb', line 8

def initialize(text = nil)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



6
7
8
# File 'lib/teams/api/typing_activity.rb', line 6

def text
  @text
end

Instance Method Details

#to_hObject



12
13
14
15
16
# File 'lib/teams/api/typing_activity.rb', line 12

def to_h
  body = { "type" => "typing" }
  body["text"] = text if text
  body
end