Class: EacRubyUtils::Templates::File::HashVariablesProvider

Inherits:
BaseVariablesProvider show all
Defined in:
lib/eac_ruby_utils/templates/file.rb

Instance Attribute Summary

Attributes inherited from BaseVariablesProvider

#source

Instance Method Summary collapse

Methods inherited from BaseVariablesProvider

#variable_value

Constructor Details

#initialize(source) ⇒ HashVariablesProvider

Returns a new instance of HashVariablesProvider.



75
76
77
# File 'lib/eac_ruby_utils/templates/file.rb', line 75

def initialize(source)
  super(source.with_indifferent_access)
end

Instance Method Details

#variable_exist?(name) ⇒ Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/eac_ruby_utils/templates/file.rb', line 79

def variable_exist?(name)
  source.key?(name)
end

#variable_fetch(name) ⇒ Object



83
84
85
# File 'lib/eac_ruby_utils/templates/file.rb', line 83

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