Sha256: 038e7052877502d0be4c806ef09b02a74d9adca173e29498ec083177e3c74a67

Contents?: true

Size: 716 Bytes

Versions: 2

Compression:

Stored size: 716 Bytes

Contents

module Mayl
  module Commands
    # Public: The Cd command navigates through YAML namespaces.
    #
    # Example
    # 
    #   command = Ls.new(env)
    #   command.execute
    #
    class Ls
      # Public: Initializes a new Cd command.
      #
      # env  - the global environment
      def initialize(env)
        @env = env
      end

      # Public: Adds the path to the namespace.
      #
      # Returns nil.
      def execute
        @env.peek.each do |option|
          print "#{option} "
        end
        nil
      end

      #######
      private
      #######

      # Public: Returns an Array with the locales of the environment.
      def locales
        @env.locales
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mayl-0.2.1 lib/mayl/commands/ls.rb
mayl-0.2.0 lib/mayl/commands/ls.rb