Class: AlexaRuby::Card
- Inherits:
-
Object
- Object
- AlexaRuby::Card
- Defined in:
- lib/alexa_ruby/response/card.rb
Overview
Class for Amazon Alexa app cards
Instance Attribute Summary collapse
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
Instance Method Summary collapse
-
#initialize(params) ⇒ Hash
constructor
Initialize new card object.
Constructor Details
#initialize(params) ⇒ Hash
Initialize new card object
16 17 18 19 20 21 22 |
# File 'lib/alexa_ruby/response/card.rb', line 16 def initialize(params) @obj = {} @obj[:type] = params[:type] || 'Simple' raise ArgumentError, 'Unknown card type' unless valid_type? @params = params build end |
Instance Attribute Details
#obj ⇒ Object (readonly)
Returns the value of attribute obj.
4 5 6 |
# File 'lib/alexa_ruby/response/card.rb', line 4 def obj @obj end |