Class: NPR::Entity::ExternalAsset
- Defined in:
- lib/npr/entity/external_asset.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ ExternalAsset
constructor
A new instance of ExternalAsset.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ ExternalAsset
Returns a new instance of ExternalAsset.
19 20 21 22 23 24 |
# File 'lib/npr/entity/external_asset.rb', line 19 def initialize(json) @id = json["id"].to_i @type = json["type"] extract_shallow_attributes(json) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/npr/entity/external_asset.rb', line 9 def id @id end |
#type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/npr/entity/external_asset.rb', line 9 def type @type end |