Class: Guideline
- Inherits:
-
Object
- Object
- Guideline
- Defined in:
- lib/xmlutils/gdlcontextobjs.rb
Overview
class Guideline
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#items ⇒ Object
Returns the value of attribute items.
-
#name ⇒ Object
Returns the value of attribute name.
-
#startDate ⇒ Object
Returns the value of attribute startDate.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#addItem(itemAry) ⇒ Object
initialize.
-
#initialize(attributes) ⇒ Guideline
constructor
A new instance of Guideline.
Constructor Details
#initialize(attributes) ⇒ Guideline
Returns a new instance of Guideline.
246 247 248 249 250 251 252 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 246 def initialize(attributes) @id = attributes["GuidelineID"] @name = attributes["Name"] @version = attributes["Version"] @startDate = attributes["StartDate"] @items = Array.new end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
239 240 241 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 239 def id @id end |
#items ⇒ Object
Returns the value of attribute items.
243 244 245 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 243 def items @items end |
#name ⇒ Object
Returns the value of attribute name.
240 241 242 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 240 def name @name end |
#startDate ⇒ Object
Returns the value of attribute startDate.
242 243 244 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 242 def startDate @startDate end |
#version ⇒ Object
Returns the value of attribute version.
241 242 243 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 241 def version @version end |
Instance Method Details
#addItem(itemAry) ⇒ Object
initialize
254 255 256 257 258 259 260 |
# File 'lib/xmlutils/gdlcontextobjs.rb', line 254 def addItem(itemAry) if (itemAry[0] == "rule" || itemAry[0] == "ruleset") items.push(itemAry) else raise "Invalid arg: expected rule or ruleset type" end # if end |