Class: Ppm
- Inherits:
-
Object
- Object
- Ppm
- Defined in:
- lib/xmlutils/gdlcontextobjs.rb
Overview
class Ppm
Instance Attribute Summary collapse
-
#alias ⇒ Object
Returns the value of attribute alias.
-
#dataType ⇒ Object
Returns the value of attribute dataType.
-
#name ⇒ Object
Returns the value of attribute name.
-
#varType ⇒ Object
Returns the value of attribute varType.
Instance Method Summary collapse
-
#initialize(name, attributes) ⇒ Ppm
constructor
def initialize(name, als, varType, dataType) @name = name @alias = als @varType = varType @dataType = dataType.
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
#alias ⇒ Object
Returns the value of attribute alias.
66 67 68 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 66 def alias @alias end |
#dataType ⇒ Object
Returns the value of attribute dataType.
68 69 70 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 68 def dataType @dataType end |
#name ⇒ Object
Returns the value of attribute name.
65 66 67 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 65 def name @name end |
#varType ⇒ Object
Returns the value of attribute varType.
67 68 69 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 67 def varType @varType end |