Class: FlowChat::Ussd::Renderer
- Inherits:
-
Object
- Object
- FlowChat::Ussd::Renderer
- Defined in:
- lib/flow_chat/ussd/renderer.rb
Instance Attribute Summary collapse
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
-
#prompt ⇒ Object
readonly
Returns the value of attribute prompt.
Instance Method Summary collapse
-
#initialize(prompt, choices) ⇒ Renderer
constructor
A new instance of Renderer.
- #render ⇒ Object
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
#choices ⇒ Object (readonly)
Returns the value of attribute choices.
4 5 6 |
# File 'lib/flow_chat/ussd/renderer.rb', line 4 def choices @choices end |
#prompt ⇒ Object (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
#render ⇒ Object
11 |
# File 'lib/flow_chat/ussd/renderer.rb', line 11 def render = build_prompt |