Class: Hypem::Track
- Inherits:
-
Object
- Object
- Hypem::Track
- Defined in:
- lib/hypem/track.rb
Constant Summary collapse
- KEY_CONVERSIONS =
{ mediaid: :media_id, dateposted: :dated_posted, siteid: :site_id, posturl: :post_url, posturl_first: :post_url_first, postid: :post_id, postid_first: :post_id_first, dateposted_first: :date_posted_first, siteid_first: :site_id_first, sitename: :site_name, dateposted: :date_posted, sitename_first: :site_name_first }
- DATETIME_CONVERSIONS =
[:date_posted, :date_posted_first]
Instance Attribute Summary collapse
-
#media_id ⇒ Object
Returns the value of attribute media_id.
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(arg) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(arg) ⇒ Track
Returns a new instance of Track.
5 6 7 8 9 10 11 |
# File 'lib/hypem/track.rb', line 5 def initialize(arg) if arg.is_a? Hash keys_to_attributes arg elsif arg.is_a? String @media_id = arg end end |
Instance Attribute Details
#media_id ⇒ Object
Returns the value of attribute media_id.
3 4 5 |
# File 'lib/hypem/track.rb', line 3 def media_id @media_id end |