Class: ConfigParser::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_quotaObject (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

#quotasObject (readonly)

Returns the value of attribute quotas.



46
47
48
# File 'lib/fluent/plugin/config_parser.rb', line 46

def quotas
  @quotas
end