Class: Cardigan::WorkflowContext
- Inherits:
-
Object
- Object
- Cardigan::WorkflowContext
- Includes:
- ShellShock::Context
- Defined in:
- lib/cardigan/workflow_context.rb
Instance Method Summary collapse
-
#initialize(io, entry) ⇒ WorkflowContext
constructor
A new instance of WorkflowContext.
Constructor Details
#initialize(io, entry) ⇒ WorkflowContext
Returns a new instance of WorkflowContext.
7 8 9 10 11 12 13 14 15 |
# File 'lib/cardigan/workflow_context.rb', line 7 def initialize io, entry @io, @entry = io, entry @prompt_text = "#{File.expand_path('.').split('/').last.slice(0..0)}/workflow > " @commands = { 'ls' => Cardigan::Command.load(:show_entry, @entry, @io), 'add' => Cardigan::Command.load(:add_transitions, @entry, @io), 'rm' => Cardigan::Command.load(:remove_transitions, @entry, @io), } end |