Class: ConfigParser::Configuration
- Inherits:
-
Object
- Object
- ConfigParser::Configuration
- Defined in:
- lib/fluent/plugin/config_parser.rb
Overview
Configuration class parses the configuration file and stores the quotas Attributes:
+quotas+: (Array of Quota) The list of quotas parsed from the configuration file.
+default_quota+: (Quota) The default quota to use when no other quota matches.
Instance Attribute Summary collapse
-
#default_quota ⇒ Object
readonly
Returns the value of attribute default_quota.
-
#quotas ⇒ Object
readonly
Returns the value of attribute quotas.
Instance Method Summary collapse
-
#initialize(config_file_path) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(config_file_path) ⇒ Configuration
Returns a new instance of Configuration.
48 49 50 51 52 53 |
# File 'lib/fluent/plugin/config_parser.rb', line 48 def initialize(config_file_path) @config_file= YAML.load_file(config_file_path) @quotas = nil @default_quota = nil parse_quotas end |
Instance Attribute Details
#default_quota ⇒ Object (readonly)
Returns the value of attribute default_quota.
46 47 48 |
# File 'lib/fluent/plugin/config_parser.rb', line 46 def default_quota @default_quota end |
#quotas ⇒ Object (readonly)
Returns the value of attribute quotas.
46 47 48 |
# File 'lib/fluent/plugin/config_parser.rb', line 46 def quotas @quotas end |