Module: CdnjsCommand::Params

Defined in:
lib/cdnjs_command/params.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](*what) ⇒ Object



4
# File 'lib/cdnjs_command/params.rb', line 4

def self.[](*what)  what.extend Params; end

Instance Method Details

#===(argv) ⇒ Object



5
# File 'lib/cdnjs_command/params.rb', line 5

def ===(argv)       argv.first_is(self); end

#extract(what) ⇒ Object



2
# File 'lib/cdnjs_command/params.rb', line 2

def extract(what)   i = index(what) and slice!(i, 2)[1] end

#first_is(what) ⇒ Object



3
# File 'lib/cdnjs_command/params.rb', line 3

def first_is(what)  shift  if what.include?(self.first); end