Class: EbmSharedLib::Options
- Inherits:
-
Object
- Object
- EbmSharedLib::Options
- Defined in:
- lib/ebmsharedlib/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
21 22 23 |
# File 'lib/ebmsharedlib/options.rb', line 21 def self. @@cmd_options ||= {} end |
.cmd_options=(options) ⇒ Object
17 18 19 |
# File 'lib/ebmsharedlib/options.rb', line 17 def self.() @@cmd_options = end |
.get(option) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/ebmsharedlib/options.rb', line 29 def self.get(option) v = [option] return v if !v.nil? v = [option] return v end |
.global_options ⇒ Object
25 26 27 |
# File 'lib/ebmsharedlib/options.rb', line 25 def self. @@global_options ||= {} end |
.global_options=(options) ⇒ Object
13 14 15 |
# File 'lib/ebmsharedlib/options.rb', line 13 def self.() @@global_options = end |