module NluAdapterIntentCollection

Class represents a collection of Intents

Attributes

intents[RW]
name[RW]

Public Class Methods

new(name, intents) click to toggle source

Constructor

# File lib/nlu_adapter/intent_collection.rb, line 8
def initialize(name, intents)
        @name = name
        @intents = intents
end

Public Instance Methods

to_h() click to toggle source

Convert self to Hash @return [Hash] ruby hash

# File lib/nlu_adapter/intent_collection.rb, line 16
def to_h
        {
                :name => @name,
                :intents => @intents.map { |i| i.to_h }
        }
end
to_json() click to toggle source

Convert self to Json @return [Json] json

# File lib/nlu_adapter/intent_collection.rb, line 26
def to_json
        to_h.to_json
end