Class: Oyster::FileOption

Inherits:
Option
  • Object
show all
Defined in:
lib/oyster/options/file.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/file.rb', line 4

def consume(list)
  File.read(list.shift)
end

#default_valueObject



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

def default_value
  super(nil)
end

#help_namesObject



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

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