Class: ApiConsumer::Elements::Meta
- Inherits:
-
Struct
- Object
- Struct
- ApiConsumer::Elements::Meta
- Defined in:
- lib/api_consumer/elements/meta.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#error_type ⇒ Object
Returns the value of attribute error_type.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Meta
constructor
A new instance of Meta.
Constructor Details
#initialize(attributes) ⇒ Meta
Returns a new instance of Meta.
5 6 7 8 |
# File 'lib/api_consumer/elements/meta.rb', line 5 def initialize(attributes) raise "Meta required a status code" unless attributes.has_key? 'code' attributes.each { |k, v| send("#{k}=", v) if respond_to?("#{k}=") } end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
3 4 5 |
# File 'lib/api_consumer/elements/meta.rb', line 3 def code @code end |
#error_message ⇒ Object
Returns the value of attribute error_message
3 4 5 |
# File 'lib/api_consumer/elements/meta.rb', line 3 def end |
#error_type ⇒ Object
Returns the value of attribute error_type
3 4 5 |
# File 'lib/api_consumer/elements/meta.rb', line 3 def error_type @error_type end |