Class: Rosette::Client::Commands::StatusCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/rosette/client/commands/status_command.rb

Overview

a show is really just a diff against your parent (so the inheritance makes sense)

Instance Attribute Summary

Attributes inherited from Command

#api, #args, #repo, #terminal, #writer

Instance Method Summary collapse

Methods inherited from Command

#initialize

Constructor Details

This class inherits a constructor from Rosette::Client::Commands::Command

Instance Method Details

#executeObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rosette/client/commands/status_command.rb', line 17

def execute
  response = api.status(
    repo_name: derive_repo_name,
    ref: args.ref
  )

  handle_error(response) do |response|
    if response.locales && response.phrase_count
      terminal.say("Status: #{response.status}")
      terminal.say(
        build_locale_table(response.locales, response.phrase_count)
      )
    end
  end
end