Class: Oncall::Options
- Inherits:
-
Object
- Object
- Oncall::Options
- Defined in:
- lib/oncall/options.rb
Instance Attribute Summary collapse
- #config ⇒ Object
- #env ⇒ Object
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#group ⇒ Object
Returns the value of attribute group.
-
#host ⇒ Object
Returns the value of attribute host.
-
#path ⇒ Object
Returns the value of attribute path.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#persist ⇒ Object
Returns the value of attribute persist.
-
#port ⇒ Object
Returns the value of attribute port.
- #runner ⇒ Object
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #parse_config ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/oncall/options.rb', line 13 def initialize @env = nil @pattern = default_pattern @exclude = '' @group = nil @persist = nil @path = nil @verbose = default_verbosity @host = default_host @port = default_port end |
Instance Attribute Details
#config ⇒ Object
29 30 31 |
# File 'lib/oncall/options.rb', line 29 def config @config ||= config_default end |
#env ⇒ Object
33 34 35 |
# File 'lib/oncall/options.rb', line 33 def env @env ||= default_env end |
#exclude ⇒ Object
Returns the value of attribute exclude.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def exclude @exclude end |
#group ⇒ Object
Returns the value of attribute group.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def group @group end |
#host ⇒ Object
Returns the value of attribute host.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def host @host end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def path @path end |
#pattern ⇒ Object
Returns the value of attribute pattern.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def pattern @pattern end |
#persist ⇒ Object
Returns the value of attribute persist.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def persist @persist end |
#port ⇒ Object
Returns the value of attribute port.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def port @port end |
#runner ⇒ Object
25 26 27 |
# File 'lib/oncall/options.rb', line 25 def runner @runner ||= Oncall::Invocations::TestRunner.new end |
#verbose ⇒ Object
Returns the value of attribute verbose.
4 5 6 |
# File 'lib/oncall/options.rb', line 4 def verbose @verbose end |
Instance Method Details
#parse_config ⇒ Object
37 38 39 40 41 42 |
# File 'lib/oncall/options.rb', line 37 def parse_config conf_file = load_config_file set_default_env conf_file conf_file end |