Class: LilyPlaying::User
- Inherits:
-
Object
- Object
- LilyPlaying::User
- Defined in:
- lib/lilyplaying/user.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #current ⇒ Object
-
#initialize ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize ⇒ User
Returns a new instance of User.
7 8 9 |
# File 'lib/lilyplaying/user.rb', line 7 def initialize() @data = .client.call("currentUser", :extras => "lastSongPlayed")['result'] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/lilyplaying/user.rb', line 5 def data @data end |
Instance Method Details
#current ⇒ Object
11 12 13 |
# File 'lib/lilyplaying/user.rb', line 11 def current ::Current.new(@data["lastSongPlayed"]) end |