Class: AnalyticsOps::CLI::Options
- Inherits:
-
Object
- Object
- AnalyticsOps::CLI::Options
- Defined in:
- lib/analytics_ops/cli/options.rb
Overview
Parses and validates command-line options without loading a workspace.
Constant Summary collapse
- DEFAULTS =
{ config: "config/analytics_ops.yml", config_explicit: false, profile: "production", profile_explicit: false, format: "human", log_level: "warn", log_level_explicit: false, transport: :grpc, transport_explicit: false, timeout_explicit: false, yes: false, noninteractive: false, compare: false, dimensions: [].freeze, metrics: [].freeze, filters: [].freeze, all_rows: false }.freeze
- SETUP_OPTIONS =
%i[property service_account].freeze
- PROPERTY_ID =
/\A\d{1,50}\z/- PROFILE =
/\A[A-Za-z][A-Za-z0-9_]{0,63}\z/- CONNECTION =
/\A[A-Za-z][A-Za-z0-9_-]{0,63}\z/
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(arguments) ⇒ Options
constructor
A new instance of Options.
- #parse!(command) ⇒ Object
Constructor Details
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
31 32 33 |
# File 'lib/analytics_ops/cli/options.rb', line 31 def values @values end |
Instance Method Details
#parse!(command) ⇒ Object
39 40 41 42 43 |
# File 'lib/analytics_ops/cli/options.rb', line 39 def parse!(command) parser.parse!(@arguments) validate!(command) @values.freeze end |