Class: Ppm

Inherits:
Object
  • Object
show all
Defined in:
lib/xmlutils/gdlcontextobjs.rb

Overview

class Ppm

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, attributes) ⇒ Ppm

def initialize(name, als, varType, dataType)

@name     = name
@alias    = als
@varType  = varType
@dataType = dataType

end # initialize



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/xmlutils/gdlcontextobjs.rb', line 77

def initialize(name, attributes)
  @name     = name
  @alias    = attributes["Name"]
  @varType  = attributes["Type"]
  @dataType = "UNKNOWN"
  @dataType = attributes["DataType"] if attributes.has_key?("DataType")


  case @varType
    when 'APM'
      @varType = "app"

    when 'CRP'
      @varType = "crd"

    when 'PRD'
      @varType = "prd"

  end # varType



  case @dataType
    when 'Boolean'
      @dataType = "boolean"

    when 'Date'
      @dataType = "date"

    when 'Money'
      @dataType = "money"

    when 'Numeric'
      @dataType = "numeric"

    when 'Percentage'
      @dataType = "percentage"

    when 'Text'
      @dataType = "text"
  end # dataType

end

Instance Attribute Details

#aliasObject

Returns the value of attribute alias.



66
67
68
# File 'lib/xmlutils/gdlcontextobjs.rb', line 66

def alias
  @alias
end

#dataTypeObject

Returns the value of attribute dataType.



68
69
70
# File 'lib/xmlutils/gdlcontextobjs.rb', line 68

def dataType
  @dataType
end

#nameObject

Returns the value of attribute name.



65
66
67
# File 'lib/xmlutils/gdlcontextobjs.rb', line 65

def name
  @name
end

#varTypeObject

Returns the value of attribute varType.



67
68
69
# File 'lib/xmlutils/gdlcontextobjs.rb', line 67

def varType
  @varType
end