Class: CPEE::AttributesHelper
- Inherits:
-
Object
- Object
- CPEE::AttributesHelper
- Defined in:
- lib/cpee/controller.rb
Overview
}}}
Instance Method Summary collapse
- #attributes ⇒ Object
- #data ⇒ Object
- #endpoints ⇒ Object
-
#translate(__attributes__, __dataelements__, __endpoints__) ⇒ Object
{{{.
Instance Method Details
#attributes ⇒ Object
74 75 76 |
# File 'lib/cpee/controller.rb', line 74 def attributes @attributes end |
#data ⇒ Object
66 67 68 |
# File 'lib/cpee/controller.rb', line 66 def data @data end |
#endpoints ⇒ Object
70 71 72 |
# File 'lib/cpee/controller.rb', line 70 def endpoints @endpoints end |
#translate(__attributes__, __dataelements__, __endpoints__) ⇒ Object
{{{
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/cpee/controller.rb', line 55 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 |