Class: Charyf::Engine::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/charyf/engine/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conversation_id, reply_message_id) ⇒ Response

Returns a new instance of Response.



8
9
10
11
12
13
14
# File 'lib/charyf/engine/response.rb', line 8

def initialize(conversation_id, reply_message_id)
  @text = nil
  @html = nil

  @conversation_id = conversation_id
  @reply_message_id = reply_message_id
end

Instance Attribute Details

#conversation_idObject (readonly)

Returns the value of attribute conversation_id.



6
7
8
# File 'lib/charyf/engine/response.rb', line 6

def conversation_id
  @conversation_id
end

#htmlObject

Returns the value of attribute html.



5
6
7
# File 'lib/charyf/engine/response.rb', line 5

def html
  @html
end

#reply_message_idObject (readonly)

Returns the value of attribute reply_message_id.



6
7
8
# File 'lib/charyf/engine/response.rb', line 6

def reply_message_id
  @reply_message_id
end

#textObject

Returns the value of attribute text.



5
6
7
# File 'lib/charyf/engine/response.rb', line 5

def text
  @text
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/charyf/engine/response.rb', line 16

def empty?
  text.blank? && html.blank?
end