Class: MetricsSatellite::Runner
- Inherits:
-
Object
- Object
- MetricsSatellite::Runner
- Defined in:
- lib/metrics_satellite/runner.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv = ARGV) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(argv = ARGV) ⇒ Runner
Returns a new instance of Runner.
11 12 13 |
# File 'lib/metrics_satellite/runner.rb', line 11 def initialize(argv = ARGV) @options = OptionParser.parse!(argv).merge(:startup_path => startup_path) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/metrics_satellite/runner.rb', line 5 def @options end |
Class Method Details
.run ⇒ Object
7 8 9 |
# File 'lib/metrics_satellite/runner.rb', line 7 def self.run new.run end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/metrics_satellite/runner.rb', line 15 def run case type when "collect" collect_reports when "post" post_reports else exit end end |