Class: Oyster::GlobOption

Inherits:
Option
  • Object
show all
Defined in:
lib/oyster/options/glob.rb

Instance Attribute Summary

Attributes inherited from Option

#description

Instance Method Summary collapse

Methods inherited from Option

#alternate, create, #has_name?, #initialize, #name

Constructor Details

This class inherits a constructor from Oyster::Option

Instance Method Details

#consume(list) ⇒ Object



4
5
6
# File 'lib/oyster/options/glob.rb', line 4

def consume(list)
  Dir.glob(list.shift)
end

#default_valueObject



8
9
10
# File 'lib/oyster/options/glob.rb', line 8

def default_value
  super([])
end

#help_namesObject



12
13
14
# File 'lib/oyster/options/glob.rb', line 12

def help_names
  super.map { |name| name + ' ARG' }
end