Class: Rosette::Client::Commands::Command

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api, terminal, writer, repo, argv) ⇒ Command

Returns a new instance of Command.



25
26
27
28
29
30
31
# File 'lib/rosette/client/commands.rb', line 25

def initialize(api, terminal, writer, repo, argv)
  @api = api
  @terminal = terminal
  @writer = writer
  @repo = repo
  @args = parse_args(argv)
end

Instance Attribute Details

#apiObject (readonly)

Returns the value of attribute api.



23
24
25
# File 'lib/rosette/client/commands.rb', line 23

def api
  @api
end

#argsObject (readonly)

Returns the value of attribute args.



23
24
25
# File 'lib/rosette/client/commands.rb', line 23

def args
  @args
end

#repoObject (readonly)

Returns the value of attribute repo.



23
24
25
# File 'lib/rosette/client/commands.rb', line 23

def repo
  @repo
end

#terminalObject (readonly)

Returns the value of attribute terminal.



23
24
25
# File 'lib/rosette/client/commands.rb', line 23

def terminal
  @terminal
end

#writerObject (readonly)

Returns the value of attribute writer.



23
24
25
# File 'lib/rosette/client/commands.rb', line 23

def writer
  @writer
end