Class: PlayTime::Upload
- Inherits:
-
Object
- Object
- PlayTime::Upload
- Defined in:
- lib/play_time/upload.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client) ⇒ Upload
constructor
A new instance of Upload.
- #upload(track) ⇒ Object
Constructor Details
#initialize(client) ⇒ Upload
Returns a new instance of Upload.
12 13 14 |
# File 'lib/play_time/upload.rb', line 12 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/play_time/upload.rb', line 10 def client @client end |
Class Method Details
.upload(track) ⇒ Object
5 6 7 8 |
# File 'lib/play_time/upload.rb', line 5 def self.upload(track) upload = Upload.new(Client.new) upload.upload(track) end |
Instance Method Details
#upload(track) ⇒ Object
16 17 18 19 20 |
# File 'lib/play_time/upload.rb', line 16 def upload(track) client. client.commit(track) end |