class AttributesHelper

Public Instance Methods

attributes() click to toggle source
# File lib/cpee/attributes_helper.rb, line 37
def attributes
  @attributes
end
data() click to toggle source
# File lib/cpee/attributes_helper.rb, line 29
def data
  @data
end
endpoints() click to toggle source
# File lib/cpee/attributes_helper.rb, line 33
def endpoints
  @endpoints
end
translate(__attributes__,__dataelements__,__endpoints__) click to toggle source
# 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