Class: Librarian::Config::HashSource
- Defined in:
- lib/librarian/config/hash_source.rb
Constant Summary
Constants inherited from Source
Source::CONFIG_KEY_VALIDITY_PATTERN, Source::RAW_KEY_SUFFIX_VALIDITY_PATTERN
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Attributes inherited from Source
Instance Method Summary collapse
-
#initialize(adapter_name, options = { }) ⇒ HashSource
constructor
A new instance of HashSource.
- #to_s ⇒ Object
Methods inherited from Source
#[], #[]=, config_key_validity_pattern, #keys, raw_key_suffix_validity_pattern
Constructor Details
#initialize(adapter_name, options = { }) ⇒ HashSource
Returns a new instance of HashSource.
10 11 12 13 14 15 |
# File 'lib/librarian/config/hash_source.rb', line 10 def initialize(adapter_name, = { }) super self.name = .delete(:name) or raise ArgumentError, "must provide name" self.raw = .delete(:raw) or raise ArgumentError, "must provide raw" end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/librarian/config/hash_source.rb', line 7 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
7 8 9 |
# File 'lib/librarian/config/hash_source.rb', line 7 def raw @raw end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/librarian/config/hash_source.rb', line 17 def to_s name end |