Class: NluAdapter::Adapters::Lex::Intent
- Inherits:
-
Object
- Object
- NluAdapter::Adapters::Lex::Intent
- Includes:
- NluAdapterIntent
- Defined in:
- lib/nlu_adapter/lex.rb
Overview
Class represents Intent in an IntentCollection
Instance Attribute Summary
Attributes included from NluAdapterIntent
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Intent
constructor
Constructor.
-
#to_h ⇒ Hash
Convert self to Hash.
-
#to_json ⇒ json
convert self to Json.
Constructor Details
#initialize(options = {}) ⇒ Intent
Constructor
142 143 144 145 146 |
# File 'lib/nlu_adapter/lex.rb', line 142 def initialize( = {}) @name = [:name] @version = [:version] @checksum = [:checksum] end |
Instance Method Details
#to_h ⇒ Hash
Convert self to Hash
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/nlu_adapter/lex.rb', line 151 def to_h { name: @name, sample_utterances: @utterences, fulfillment_activity: { type: "ReturnIntent" }, checksum: @checksum } end |
#to_json ⇒ json
convert self to Json
165 166 167 |
# File 'lib/nlu_adapter/lex.rb', line 165 def to_json to_h.to_json end |