Class: Agen::BaseOptions
- Inherits:
-
Object
- Object
- Agen::BaseOptions
- Defined in:
- lib/agen/base_options.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(options) ⇒ BaseOptions
constructor
A new instance of BaseOptions.
- #set_histfile ⇒ Object
- #set_rcfile ⇒ Object
Constructor Details
#initialize(options) ⇒ BaseOptions
Returns a new instance of BaseOptions.
5 6 7 |
# File 'lib/agen/base_options.rb', line 5 def initialize() @options = end |
Instance Method Details
#set_histfile ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/agen/base_options.rb', line 9 def set_histfile # handle not set here if !defined?(self.class::HISTFILE) puts "Please specify shell history file with -h option. See agen --help." return false end .tap do |opts| opts[:histfile] = self.class::HISTFILE end end |
#set_rcfile ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/agen/base_options.rb', line 21 def set_rcfile if !defined?(self.class::RCFILE) puts "Please specify shell rc file with -r option. See agen --help." return false end .tap do |opts| opts[:rcfile] = self.class::RCFILE end end |