class Configuration
Attributes
options[RW]
Public Class Methods
load()
click to toggle source
# File lib/configuration.rb, line 7 def self.load if Rails.env.development? Configuration.new else @@config ||= Configuration.new end end
new()
click to toggle source
# File lib/configuration.rb, line 15 def initialize config_file = File.join('doc', 'api_doc.yml') Rails.logger.info("Loading EasyApiDoc configuration file #{config_file}") @options = YAML.load(File.read(config_file)) end
Public Instance Methods
[](key)
click to toggle source
Allow straight hash access to the options
# File lib/configuration.rb, line 23 def [](key) @options[key] end