Class: Ruleset
- Inherits:
-
Object
- Object
- Ruleset
- Defined in:
- lib/xmlutils/gdlcontextobjs.rb
Overview
class Ruleset
Instance Attribute Summary collapse
-
#alias ⇒ Object
Returns the value of attribute alias.
-
#execType ⇒ Object
This indicated the execute type (TRUE, FALSE, CONTINUE).
-
#name ⇒ Object
Returns the value of attribute name.
-
#rules ⇒ Object
rule aliases.
-
#type ⇒ Object
This indicates the ruleset type (Normal, PL).
Instance Method Summary collapse
-
#addRule(als) ⇒ Object
initialize.
-
#initialize(attributes) ⇒ Ruleset
constructor
A new instance of Ruleset.
Constructor Details
#initialize(attributes) ⇒ Ruleset
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 186 def initialize(attributes) rsAlias = attributes["Name"] # Parse out the exit type case attributes["Type"] when "0" rsType = "Normal" when "1" rsType = "PL" else rsType = "*** UNKNOWN ***" end # Parse out the execute type case attributes["ExecuteType"] when "1" rsExecType = "true" when "2" rsExecType = "false" when "3" rsExecType = "continue" else rsExecType = "*** UNKNOWN ***" end # Store the results @name = rsAlias @alias = rsAlias @type = rsType @execType = rsExecType @rules = Array.new end |
Instance Attribute Details
#alias ⇒ Object
Returns the value of attribute alias.
180 181 182 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 180 def alias @alias end |
#execType ⇒ Object
This indicated the execute type (TRUE, FALSE, CONTINUE)
183 184 185 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 183 def execType @execType end |
#name ⇒ Object
Returns the value of attribute name.
179 180 181 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 179 def name @name end |
#rules ⇒ Object
rule aliases
181 182 183 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 181 def rules @rules end |
#type ⇒ Object
This indicates the ruleset type (Normal, PL)
182 183 184 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 182 def type @type end |
Instance Method Details
#addRule(als) ⇒ Object
initialize
224 225 226 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 224 def addRule(als) @rules << als end |