Method: WitBot::Expression#initialize
- Defined in:
- lib/wit_bot/models/wit/expression.rb
#initialize(intent, body, request: false) ⇒ Expression
Returns a new instance of Expression.
5 6 7 8 9 |
# File 'lib/wit_bot/models/wit/expression.rb', line 5 def initialize(intent, body, request: false) @intent = intent @body = body.is_a?(Hash) ? body.with_indifferent_access[:body] : body create if request end |