Class: CLIForge::BinCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/cli_forge/bin_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ BinCommand

Returns a new instance of BinCommand.



3
4
5
# File 'lib/cli_forge/bin_command.rb', line 3

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/cli_forge/bin_command.rb', line 7

def path
  @path
end

Instance Method Details

#call(arguments) ⇒ Object



13
14
15
# File 'lib/cli_forge/bin_command.rb', line 13

def call(arguments)
  exec path, *arguments
end

#to_sObject



9
10
11
# File 'lib/cli_forge/bin_command.rb', line 9

def to_s
  "#<#{self.class} #{path}>"
end