Class: Hrk::Execute::Command
- Inherits:
-
Object
- Object
- Hrk::Execute::Command
- Defined in:
- lib/hrk/execute/command.rb
Constant Summary collapse
- ARG =
/\A-[ar]\Z/
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize ⇒ Command
8 9 10 |
# File 'lib/hrk/execute/command.rb', line 8 def initialize @env = Hrk::Env.new end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
4 5 6 |
# File 'lib/hrk/execute/command.rb', line 4 def env @env end |
Instance Method Details
#call(*args) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/hrk/execute/command.rb', line 12 def call *args command, remote = command_and_remote args Hrk::Heroku.new(*remote).call(*command).tap do @env.remote = remote @env.last_time = Time.now end end |