Class: Yap::Shell::Command
- Inherits:
-
Object
- Object
- Yap::Shell::Command
- Defined in:
- lib/yap/shell/commands.rb
Direct Known Subclasses
BuiltinCommand, FileSystemCommand, RubyCommand, ShellCommand
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#heredoc ⇒ Object
Returns the value of attribute heredoc.
-
#line ⇒ Object
Returns the value of attribute line.
-
#str ⇒ Object
Returns the value of attribute str.
-
#world ⇒ Object
Returns the value of attribute world.
Instance Method Summary collapse
-
#initialize(world:, str:, args: [], line: nil, heredoc: nil) ⇒ Command
constructor
A new instance of Command.
- #to_executable_str ⇒ Object
Constructor Details
#initialize(world:, str:, args: [], line: nil, heredoc: nil) ⇒ Command
Returns a new instance of Command.
27 28 29 30 31 32 33 |
# File 'lib/yap/shell/commands.rb', line 27 def initialize(world:, str:, args:[], line:nil, heredoc:nil) @world = world @str = str @args = args @heredoc = heredoc @line = line end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
24 25 26 |
# File 'lib/yap/shell/commands.rb', line 24 def args @args end |
#heredoc ⇒ Object
Returns the value of attribute heredoc.
25 26 27 |
# File 'lib/yap/shell/commands.rb', line 25 def heredoc @heredoc end |
#line ⇒ Object
Returns the value of attribute line.
24 25 26 |
# File 'lib/yap/shell/commands.rb', line 24 def line @line end |
#str ⇒ Object
Returns the value of attribute str.
24 25 26 |
# File 'lib/yap/shell/commands.rb', line 24 def str @str end |
#world ⇒ Object
Returns the value of attribute world.
24 25 26 |
# File 'lib/yap/shell/commands.rb', line 24 def world @world end |
Instance Method Details
#to_executable_str ⇒ Object
35 36 37 |
# File 'lib/yap/shell/commands.rb', line 35 def to_executable_str raise NotImplementedError, ":to_executable_str must be implemented by including object." end |