Class: ApiAiRuby::Context
- Inherits:
-
Object
- Object
- ApiAiRuby::Context
- Defined in:
- lib/api-ai-ruby/models/context.rb
Instance Attribute Summary collapse
-
#lifespan ⇒ Object
Returns the value of attribute lifespan.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
Instance Method Summary collapse
-
#initialize(name, lifespan = 5, parameters = {}) ⇒ Context
constructor
A new instance of Context.
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(name, lifespan = 5, parameters = {}) ⇒ Context
Returns a new instance of Context.
8 9 10 11 12 |
# File 'lib/api-ai-ruby/models/context.rb', line 8 def initialize (name, lifespan = 5, parameters = {}) @name = name @lifespan = lifespan @parameters = parameters end |
Instance Attribute Details
#lifespan ⇒ Object
Returns the value of attribute lifespan.
3 4 5 |
# File 'lib/api-ai-ruby/models/context.rb', line 3 def lifespan @lifespan end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/api-ai-ruby/models/context.rb', line 3 def name @name end |
#parameters ⇒ Object
Returns the value of attribute parameters.
3 4 5 |
# File 'lib/api-ai-ruby/models/context.rb', line 3 def parameters @parameters end |
Instance Method Details
#to_json(*args) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/api-ai-ruby/models/context.rb', line 14 def to_json(*args) { :name => name, :lifespan => lifespan, :parameters => parameters }.to_json(*args) end |