Class: Ddr::FileTools::Tool

Inherits:
Object
  • Object
show all
Defined in:
lib/ddr/filetools/tool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Tool

Returns a new instance of Tool.



7
8
9
10
# File 'lib/ddr/filetools/tool.rb', line 7

def initialize(opts)
  @command = opts.fetch(:command)
  @provider = opts.fetch(:provider)
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



5
6
7
# File 'lib/ddr/filetools/tool.rb', line 5

def command
  @command
end

#providerObject (readonly)

Returns the value of attribute provider.



5
6
7
# File 'lib/ddr/filetools/tool.rb', line 5

def provider
  @provider
end

Instance Method Details

#call(*args) ⇒ Object



12
13
14
# File 'lib/ddr/filetools/tool.rb', line 12

def call(*args)
  build_command.call(*args)
end