Class: ZZSharedLib::Options
- Inherits:
-
Object
- Object
- ZZSharedLib::Options
- Defined in:
- lib/zzsharedlib/options.rb
Overview
tracks the global and per command options but lets you fetch values without regard to which one. The command is checked before the global
Class Method Summary collapse
- .cmd_options ⇒ Object
- .cmd_options=(options) ⇒ Object
- .get(option) ⇒ Object
- .global_options ⇒ Object
- .global_options=(options) ⇒ Object
Class Method Details
.cmd_options ⇒ Object
14 15 16 |
# File 'lib/zzsharedlib/options.rb', line 14 def self. @@cmd_options ||= {} end |
.cmd_options=(options) ⇒ Object
10 11 12 |
# File 'lib/zzsharedlib/options.rb', line 10 def self.() @@cmd_options = end |
.get(option) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/zzsharedlib/options.rb', line 22 def self.get(option) v = [option] return v if !v.nil? v = [option] return v end |
.global_options ⇒ Object
18 19 20 |
# File 'lib/zzsharedlib/options.rb', line 18 def self. @@global_options ||= {} end |
.global_options=(options) ⇒ Object
6 7 8 |
# File 'lib/zzsharedlib/options.rb', line 6 def self.() @@global_options = end |