class Ellipses::Client::Config
Public Class Methods
new(**options)
click to toggle source
# File lib/ellipses/client/config.rb, line 12 def initialize(**options) @config = build OpenStruct.new(options.compact) end
Private Instance Methods
build(config)
click to toggle source
# File lib/ellipses/client/config.rb, line 25 def build(config) config.paths = default_paths if !config.paths || config.paths.empty? config.paths.compact! config end
default_paths()
click to toggle source
# File lib/ellipses/client/config.rb, line 18 def default_paths environment = %w[ELLIPSES_PATH SRCPATH].find { |env| ENV.key? env } paths = environment ? ENV[environment].split(':') : [] ['.', *paths] end