Class: Rdio::BaseObj

Inherits:
ApiObj show all
Defined in:
lib/rdio/base.rb

Overview


An ApiObj with a ‘key’


Direct Known Subclasses

AlbumData, ArtistData, PlaylistData, TrackData, UserData

Instance Attribute Summary collapse

Attributes inherited from ApiObj

#api

Instance Method Summary collapse

Methods inherited from ApiObj

#fill

Constructor Details

#initialize(api) ⇒ BaseObj

Returns a new instance of BaseObj.



236
237
238
# File 'lib/rdio/base.rb', line 236

def initialize(api)
  super api
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



234
235
236
# File 'lib/rdio/base.rb', line 234

def key
  @key
end

Instance Method Details

#eql?(that) ⇒ Boolean

Compares only by key

Returns:



241
242
243
# File 'lib/rdio/base.rb', line 241

def eql?(that)  
  self.class.equal? that.class and self.key.equal? that.key
end

#to_kObject



245
246
247
# File 'lib/rdio/base.rb', line 245

def to_k
  key
end