Class: Ddr::FileTools::Tool
- Inherits:
-
Object
- Object
- Ddr::FileTools::Tool
- Defined in:
- lib/ddr/filetools/tool.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(opts) ⇒ Tool
constructor
A new instance of Tool.
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
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/ddr/filetools/tool.rb', line 5 def command @command end |
#provider ⇒ Object (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 |