Class: NContent::SDK::Config

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/ncontent/sdk/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parse_yaml(yaml_path) ⇒ Object



77
78
79
# File 'lib/ncontent/sdk/config.rb', line 77

def self.parse_yaml(yaml_path)
  YAML.load(ERB.new(File.read(yaml_path)).result) if File.exist?(yaml_path)
end

Instance Method Details

#new_relic_agent_available?Boolean

Returns:

  • (Boolean)


73
74
75
# File 'lib/ncontent/sdk/config.rb', line 73

def new_relic_agent_available?
  defined?(::NewRelic) && defined?(::NewRelic::Agent)
end