Class: Onceover::Metrics::CLI
- Inherits:
-
Object
- Object
- Onceover::Metrics::CLI
- Defined in:
- lib/onceover/metrics/cli.rb
Class Method Summary collapse
-
.command ⇒ Object
Static method defining the new command to be added.
Class Method Details
.command ⇒ Object
Static method defining the new command to be added
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/onceover/metrics/cli.rb', line 9 def self.command @cmd ||= Cri::Command.define do name 'metrics' usage 'metrics [--format NAME]' summary "Metrics plugin for Onceover" description <<-DESCRIPTION Output some handy code metrics so you can guage the size of your Puppet code DESCRIPTION option nil, :format, 'Format - json, csv or text', :argument => :optional, default: "text" flag nil, :detailed, 'Output per-class stats in text mode', :argument => :optional, default: false run do |opts, args, cmd| Onceover::Metrics::Metrics.run opts end end end |