Class: EacTemplates::Variables::Providers::ConfigReader
- Inherits:
-
Base
- Object
- Base
- EacTemplates::Variables::Providers::ConfigReader
show all
- Defined in:
- lib/eac_templates/variables/providers/config_reader.rb
Instance Attribute Summary
Attributes inherited from Base
#source
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #variable_value
Class Method Details
.accept?(variables_source) ⇒ Boolean
8
9
10
11
12
13
|
# File 'lib/eac_templates/variables/providers/config_reader.rb', line 8
def accept?(variables_source)
return false unless variables_source.respond_to?(:entry)
entry = variables_source.entry(:any_value)
entry.respond_to?(:value) && entry.respond_to?(:found?)
end
|
Instance Method Details
#variable_exist?(name) ⇒ Boolean
16
17
18
|
# File 'lib/eac_templates/variables/providers/config_reader.rb', line 16
def variable_exist?(name)
source.entry(name).found?
end
|
#variable_fetch(name) ⇒ Object
20
21
22
|
# File 'lib/eac_templates/variables/providers/config_reader.rb', line 20
def variable_fetch(name)
source.entry(name).value
end
|