Class: Librarian::Config::FileSource

Inherits:
Source
  • Object
show all
Defined in:
lib/librarian/config/file_source.rb

Constant Summary

Constants inherited from Source

Source::CONFIG_KEY_VALIDITY_PATTERN, Source::RAW_KEY_SUFFIX_VALIDITY_PATTERN

Instance Attribute Summary collapse

Attributes inherited from Source

#adapter_name

Instance Method Summary collapse

Methods inherited from Source

#[], #[]=, config_key_validity_pattern, #keys, raw_key_suffix_validity_pattern

Constructor Details

#initialize(adapter_name, options = { }) ⇒ FileSource

Returns a new instance of FileSource.



12
13
14
15
16
# File 'lib/librarian/config/file_source.rb', line 12

def initialize(adapter_name, options = { })
  super

  self.config_path = options.delete(:config_path) or raise ArgumentError, "must provide config_path"
end

Instance Attribute Details

#config_pathObject

Returns the value of attribute config_path.



9
10
11
# File 'lib/librarian/config/file_source.rb', line 9

def config_path
  @config_path
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/librarian/config/file_source.rb', line 18

def to_s
  config_path
end