Sha256: 39a8a591433ec0a3083279e2e5d9f633183e3666072c03218931c3ee21be8974

Contents?: true

Size: 547 Bytes

Versions: 1

Compression:

Stored size: 547 Bytes

Contents

module FS
  module Alias
    ALIASES = {
      :ls      => :list,
      :mkdir   => :makedir,
      :mkdir_p => :makedirs,
      :rmdir   => :removedir,
      :rm_r    => :removedirs,
      :cd      => :changedir,
      :mv      => :move,
      :cp      => :copy,
      :rm      => :remove,
      :cat     => :read,
      :ln      => :link,
    }
    
    def self.included(base)
      base.class_eval do
        ALIASES.each do |shortcut, original|
          alias_method shortcut, original          
        end
      end
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fs-0.1.0 lib/fs/alias.rb