Class: Lapidarius::Command
- Inherits:
-
Object
- Object
- Lapidarius::Command
- Defined in:
- lib/lapidarius/command.rb
Instance Attribute Summary collapse
-
#dep ⇒ Object
readonly
Returns the value of attribute dep.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(dep_klass: ::Gem::Commands::DependencyCommand, ui_klass: UI) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(dep_klass: ::Gem::Commands::DependencyCommand, ui_klass: UI) ⇒ Command
Returns a new instance of Command.
8 9 10 11 |
# File 'lib/lapidarius/command.rb', line 8 def initialize(dep_klass: ::Gem::Commands::DependencyCommand, ui_klass: UI) @dep = dep_klass.new @dep.ui = ui_klass.new end |
Instance Attribute Details
#dep ⇒ Object (readonly)
Returns the value of attribute dep.
6 7 8 |
# File 'lib/lapidarius/command.rb', line 6 def dep @dep end |
Instance Method Details
#call(*args) ⇒ Object
13 14 15 16 17 |
# File 'lib/lapidarius/command.rb', line 13 def call(*args) @dep.ui.clear! @dep.invoke(*(args)) @dep.ui.out end |