Class: Mayl::Commands::Ls
- Inherits:
-
Object
- Object
- Mayl::Commands::Ls
- Defined in:
- lib/mayl/commands/ls.rb
Overview
Public: The Cd command navigates through YAML namespaces.
Example
command = Ls.new(env)
command.execute
Instance Method Summary collapse
-
#execute ⇒ Object
Public: Adds the path to the namespace.
-
#initialize(env) ⇒ Ls
constructor
Public: Initializes a new Cd command.
Constructor Details
#initialize(env) ⇒ Ls
Public: Initializes a new Cd command.
env - the global environment
14 15 16 |
# File 'lib/mayl/commands/ls.rb', line 14 def initialize(env) @env = env end |
Instance Method Details
#execute ⇒ Object
Public: Adds the path to the namespace.
Returns nil.
21 22 23 24 25 26 |
# File 'lib/mayl/commands/ls.rb', line 21 def execute @env.peek.each do |option| print "#{option} " end nil end |