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
11
12
13
14
15
16
|
# File 'lib/eac_templates/variables/providers/config_reader.rb', line 11
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
19
20
21
|
# File 'lib/eac_templates/variables/providers/config_reader.rb', line 19
def variable_exist?(name)
source.entry(name).found?
end
|
#variable_fetch(name) ⇒ Object
23
24
25
|
# File 'lib/eac_templates/variables/providers/config_reader.rb', line 23
def variable_fetch(name)
source.entry(name).value
end
|