Class: Localeapp::CLI::Update
- Inherits:
-
Object
- Object
- Localeapp::CLI::Update
- Defined in:
- lib/localeapp/cli/update.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(output = $stdout) ⇒ Update
constructor
A new instance of Update.
Constructor Details
#initialize(output = $stdout) ⇒ Update
Returns a new instance of Update.
4 5 6 |
# File 'lib/localeapp/cli/update.rb', line 4 def initialize(output = $stdout) @output = output end |
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/localeapp/cli/update.rb', line 8 def execute poller = Localeapp::Poller.new @output.puts("Localeapp update: checking for translations since #{poller.updated_at}") if poller.poll! @output.puts "Found and updated new translations" else @output.puts "No new translations" end end |