Class: NPR::Entity::Audio

Inherits:
Base
  • Object
show all
Defined in:
lib/npr/entity/audio.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concern::ShallowAttributes

included

Methods included from Concern::Relation

included

Constructor Details

#initialize(json) ⇒ Audio




15
16
17
18
19
20
21
# File 'lib/npr/entity/audio.rb', line 15

def initialize(json)
  @id   = json["id"].to_i
  @type = json["type"]

  create_relations(json)
  extract_shallow_attributes(json)
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/npr/entity/audio.rb', line 7

def id
  @id
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/npr/entity/audio.rb', line 7

def type
  @type
end