Class: Rosette::Client::Commands::RepoSnapshotCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/rosette/client/commands/repo_snapshot_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
# File 'lib/rosette/client/commands/repo_snapshot_command.rb', line 17

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

  handle_error(response) do |response|
    print_hash(response.attributes)
  end
end