Class: EacTemplates::VariableProviders::EntriesReader

Inherits:
Base
  • Object
show all
Defined in:
lib/eac_templates/variable_providers/entries_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

Constructor Details

This class inherits a constructor from EacTemplates::VariableProviders::Base

Class Method Details

.accept?(variables_source) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/eac_templates/variable_providers/entries_reader.rb', line 9

def accept?(variables_source)
  variables_source.respond_to?(:read_entry)
end

Instance Method Details

#variable_exist?(_name) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/eac_templates/variable_providers/entries_reader.rb', line 14

def variable_exist?(_name)
  true
end

#variable_fetch(name) ⇒ Object



18
19
20
# File 'lib/eac_templates/variable_providers/entries_reader.rb', line 18

def variable_fetch(name)
  source.read_entry(name)
end