Class: AlexaGenerator::Intent
- Inherits:
-
Object
- Object
- AlexaGenerator::Intent
- Defined in:
- lib/alexa_generator/intent.rb
Defined Under Namespace
Modules: AmazonIntentType Classes: Builder
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slots ⇒ Object
readonly
Returns the value of attribute slots.
Class Method Summary collapse
Instance Method Summary collapse
- #amazon_intent? ⇒ Boolean
-
#initialize(name, slots) ⇒ Intent
constructor
A new instance of Intent.
Constructor Details
#initialize(name, slots) ⇒ Intent
Returns a new instance of Intent.
70 71 72 73 |
# File 'lib/alexa_generator/intent.rb', line 70 def initialize(name, slots) @name = name @slots = slots end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
31 32 33 |
# File 'lib/alexa_generator/intent.rb', line 31 def name @name end |
#slots ⇒ Object (readonly)
Returns the value of attribute slots.
31 32 33 |
# File 'lib/alexa_generator/intent.rb', line 31 def slots @slots end |
Class Method Details
.build(name, &block) ⇒ Object
79 80 81 82 83 |
# File 'lib/alexa_generator/intent.rb', line 79 def self.build(name, &block) builder = Builder.new(name) block.call(builder) if block builder end |
Instance Method Details
#amazon_intent? ⇒ Boolean
75 76 77 |
# File 'lib/alexa_generator/intent.rb', line 75 def amazon_intent? AmazonIntentType.amazon_intent?(@name) end |