Class: Croudia::Object::Base
- Inherits:
-
Object
- Object
- Croudia::Object::Base
- Defined in:
- lib/croudia/object/base.rb
Direct Known Subclasses
Cursor, Entities, Identity, Location, Relationship, SearchMetadata, SearchResult, Source, Tokens, Trend, TrendDetails
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
Class Method Summary collapse
- .attr_reader_as_array_object(attribute, object) ⇒ Object
- .attr_reader_as_object(attribute, object) ⇒ Object
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attrs = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 |
# File 'lib/croudia/object/base.rb', line 6 def initialize(attrs = {}) @attrs = attrs || {} @attrs.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
4 5 6 |
# File 'lib/croudia/object/base.rb', line 4 def attrs @attrs end |