Class: Gpuzzletime::Command::Upload
- Inherits:
-
Object
- Object
- Gpuzzletime::Command::Upload
- Defined in:
- lib/gpuzzletime/command/upload.rb
Overview
Upload entries to puzzletime
Instance Attribute Summary collapse
-
#entries ⇒ Object
writeonly
Sets the attribute entries.
Instance Method Summary collapse
-
#initialize(config) ⇒ Upload
constructor
A new instance of Upload.
- #needs_entries? ⇒ Boolean
- #run ⇒ Object
Constructor Details
#initialize(config) ⇒ Upload
Returns a new instance of Upload.
9 10 11 12 |
# File 'lib/gpuzzletime/command/upload.rb', line 9 def initialize(config) @config = config @entries = {} end |
Instance Attribute Details
#entries=(value) ⇒ Object (writeonly)
Sets the attribute entries
7 8 9 |
# File 'lib/gpuzzletime/command/upload.rb', line 7 def entries=(value) @entries = value end |
Instance Method Details
#needs_entries? ⇒ Boolean
14 15 16 |
# File 'lib/gpuzzletime/command/upload.rb', line 14 def needs_entries? true end |
#run ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/gpuzzletime/command/upload.rb', line 18 def run @entries.each do |date, list| puts "Uploading #{date}" list.each do |entry| open_browser(entry) end end end |