Class: Oncall::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/oncall/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

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

#configObject



29
30
31
# File 'lib/oncall/options.rb', line 29

def config
  @config ||= config_default
end

#envObject



33
34
35
# File 'lib/oncall/options.rb', line 33

def env
  @env ||= default_env
end

#excludeObject

Returns the value of attribute exclude.



4
5
6
# File 'lib/oncall/options.rb', line 4

def exclude
  @exclude
end

#groupObject

Returns the value of attribute group.



4
5
6
# File 'lib/oncall/options.rb', line 4

def group
  @group
end

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/oncall/options.rb', line 4

def host
  @host
end

#pathObject

Returns the value of attribute path.



4
5
6
# File 'lib/oncall/options.rb', line 4

def path
  @path
end

#patternObject

Returns the value of attribute pattern.



4
5
6
# File 'lib/oncall/options.rb', line 4

def pattern
  @pattern
end

#persistObject

Returns the value of attribute persist.



4
5
6
# File 'lib/oncall/options.rb', line 4

def persist
  @persist
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/oncall/options.rb', line 4

def port
  @port
end

#runnerObject



25
26
27
# File 'lib/oncall/options.rb', line 25

def runner
  @runner ||= Oncall::Invocations::TestRunner.new
end

#verboseObject

Returns the value of attribute verbose.



4
5
6
# File 'lib/oncall/options.rb', line 4

def verbose
  @verbose
end

Instance Method Details

#parse_configObject



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
  update_options conf_file
end