Class: Trevl::Configuration

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

Constant Summary collapse

HIGHCHARTS_CDN_URL =

Highcharts is commercially licensed and not bundled with this gem, so it is loaded from the CDN unless a local copy is configured.

"https://code.highcharts.com/11.4.0/highcharts.js"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
# File 'lib/trevl/configuration.rb', line 12

def initialize
  @logger = Logger.new($stderr, level: Logger::WARN)
  @template_store = nil
  @highcharts_url = HIGHCHARTS_CDN_URL
  @highcharts_path = nil
  @highcharts_modules = []
end

Instance Attribute Details

#highcharts_modulesObject

Returns the value of attribute highcharts_modules.



9
10
11
# File 'lib/trevl/configuration.rb', line 9

def highcharts_modules
  @highcharts_modules
end

#highcharts_pathObject

Returns the value of attribute highcharts_path.



9
10
11
# File 'lib/trevl/configuration.rb', line 9

def highcharts_path
  @highcharts_path
end

#highcharts_urlObject

Returns the value of attribute highcharts_url.



9
10
11
# File 'lib/trevl/configuration.rb', line 9

def highcharts_url
  @highcharts_url
end

#loggerObject

Returns the value of attribute logger.



9
10
11
# File 'lib/trevl/configuration.rb', line 9

def logger
  @logger
end

#template_storeObject



20
21
22
# File 'lib/trevl/configuration.rb', line 20

def template_store
  @template_store ||= TemplateStore.new
end