Class: EacTemplates::Variables::Providers::Generic

Inherits:
Base
  • Object
show all
Defined in:
lib/eac_templates/variables/providers/generic.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::Variables::Providers::Base

Class Method Details

.accept?(variables_source) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/eac_templates/variables/providers/generic.rb', line 10

def accept?(variables_source)
  variables_source.is_a?(::Object)
end

Instance Method Details

#variable_exist?(name) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/eac_templates/variables/providers/generic.rb', line 15

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

#variable_fetch(name) ⇒ Object



19
20
21
# File 'lib/eac_templates/variables/providers/generic.rb', line 19

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