Class: Ora::Cli::Task
- Inherits:
-
Object
- Object
- Ora::Cli::Task
- Defined in:
- lib/ora/cli/task.rb
Direct Known Subclasses
NewFeatureBranch, PushFeatureBranch, PushToMaster, PushToStaging, PushToUat
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#print ⇒ Object
readonly
Returns the value of attribute print.
-
#stdin ⇒ Object
readonly
Returns the value of attribute stdin.
Instance Method Summary collapse
- #commands ⇒ Object
-
#initialize(from, inputs: [], print: Print.new) ⇒ Task
constructor
A new instance of Task.
- #run ⇒ Object
Constructor Details
#initialize(from, inputs: [], print: Print.new) ⇒ Task
Returns a new instance of Task.
5 6 7 8 9 10 11 |
# File 'lib/ora/cli/task.rb', line 5 def initialize(from, inputs: [], print: Print.new) @from = from @bash = Bash.new(self, from: @from, print: print) @branch = current_branch @stdin = Stdin.new(inputs, print: print) @print = print end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
3 4 5 |
# File 'lib/ora/cli/task.rb', line 3 def branch @branch end |
#print ⇒ Object (readonly)
Returns the value of attribute print.
3 4 5 |
# File 'lib/ora/cli/task.rb', line 3 def print @print end |
#stdin ⇒ Object (readonly)
Returns the value of attribute stdin.
3 4 5 |
# File 'lib/ora/cli/task.rb', line 3 def stdin @stdin end |
Instance Method Details
#commands ⇒ Object
17 18 19 |
# File 'lib/ora/cli/task.rb', line 17 def commands raise "Override this method in subclass" end |
#run ⇒ Object
13 14 15 |
# File 'lib/ora/cli/task.rb', line 13 def run @bash.run commands end |