Class: Openphar::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/openphar.rb

Overview

Configuration class for library settings

Examples:

Openphar.configure do |config|
  config.data_path = '/path/to/data'
  config.logger = Logger.new(STDOUT)
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



84
85
86
87
88
# File 'lib/openphar.rb', line 84

def initialize
  @ontology_path = Openphar.ontology_path
  @data_path = Openphar.data_path
  @logger = Logger.new($stdout, level: :warn)
end

Instance Attribute Details

#data_pathObject

Returns the value of attribute data_path.



82
83
84
# File 'lib/openphar.rb', line 82

def data_path
  @data_path
end

#loggerObject

Returns the value of attribute logger.



82
83
84
# File 'lib/openphar.rb', line 82

def logger
  @logger
end

#ontology_pathObject

Returns the value of attribute ontology_path.



82
83
84
# File 'lib/openphar.rb', line 82

def ontology_path
  @ontology_path
end