Class: FlowChat::Ussd::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_chat/ussd/renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prompt, choices: nil, media: nil) ⇒ Renderer

Returns a new instance of Renderer.



6
7
8
9
10
# File 'lib/flow_chat/ussd/renderer.rb', line 6

def initialize(prompt, choices: nil, media: nil)
  @prompt = prompt
  @choices = choices
  @media = media
end

Instance Attribute Details

#choicesObject (readonly)

Returns the value of attribute choices.



4
5
6
# File 'lib/flow_chat/ussd/renderer.rb', line 4

def choices
  @choices
end

#mediaObject (readonly)

Returns the value of attribute media.



4
5
6
# File 'lib/flow_chat/ussd/renderer.rb', line 4

def media
  @media
end

#promptObject (readonly)

Returns the value of attribute prompt.



4
5
6
# File 'lib/flow_chat/ussd/renderer.rb', line 4

def prompt
  @prompt
end

Instance Method Details

#renderObject



12
# File 'lib/flow_chat/ussd/renderer.rb', line 12

def render = build_prompt