Class: AttributesHelper
- Inherits:
-
Object
- Object
- AttributesHelper
- Defined in:
- lib/cpee/attributes_helper.rb
Instance Method Summary collapse
- #attributes ⇒ Object
- #data ⇒ Object
- #endpoints ⇒ Object
- #translate(__attributes__, __dataelements__, __endpoints__) ⇒ Object
Instance Method Details
#attributes ⇒ Object
37 38 39 |
# File 'lib/cpee/attributes_helper.rb', line 37 def attributes @attributes end |
#data ⇒ Object
29 30 31 |
# File 'lib/cpee/attributes_helper.rb', line 29 def data @data end |
#endpoints ⇒ Object
33 34 35 |
# File 'lib/cpee/attributes_helper.rb', line 33 def endpoints @endpoints end |
#translate(__attributes__, __dataelements__, __endpoints__) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cpee/attributes_helper.rb', line 18 def translate(__attributes__,__dataelements__,__endpoints__) @data = WEEL::ReadHash.new(__dataelements__) @endpoints = WEEL::ReadHash.new(__endpoints__) @attributes = WEEL::ReadHash.new(__attributes__) __attributes__.transform_values do |v| v.gsub(/(!(attributes|data|endpoints)\.[\w_]+)/) do |m| eval(m[1..-1]) end end end |