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) ⇒ Renderer

Returns a new instance of Renderer.



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

def initialize(prompt, choices)
  @prompt = prompt
  @choices = choices
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

#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



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

def render = build_prompt