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.
11 12 13 |
# File 'lib/play_time/upload.rb', line 11 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
9 10 11 |
# File 'lib/play_time/upload.rb', line 9 def client @client end |
Class Method Details
.upload(track) ⇒ Object
5 6 7 |
# File 'lib/play_time/upload.rb', line 5 def self.upload(track) new(Client.new).upload(track) end |
Instance Method Details
#upload(track) ⇒ Object
15 16 17 18 19 |
# File 'lib/play_time/upload.rb', line 15 def upload(track) client. client.commit(track) end |