Class: Srgs::Rule
- Inherits:
-
Object
- Object
- Srgs::Rule
- Defined in:
- lib/srgs/elements/rule.rb
Instance Attribute Summary collapse
-
#dynamic ⇒ Object
Returns the value of attribute dynamic.
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#id ⇒ Object
Returns the value of attribute id.
-
#scope ⇒ Object
Returns the value of attribute scope.
Instance Method Summary collapse
- #<<(element) ⇒ Object
-
#initialize(id, scope = 'private', dynamic = nil) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(id, scope = 'private', dynamic = nil) ⇒ Rule
Returns a new instance of Rule.
6 7 8 9 10 11 |
# File 'lib/srgs/elements/rule.rb', line 6 def initialize(id, scope = 'private', dynamic = nil) @id = id @elements = Array.new @scope = scope @dynamic = dynamic end |
Instance Attribute Details
#dynamic ⇒ Object
Returns the value of attribute dynamic.
4 5 6 |
# File 'lib/srgs/elements/rule.rb', line 4 def dynamic @dynamic end |
#elements ⇒ Object
Returns the value of attribute elements.
4 5 6 |
# File 'lib/srgs/elements/rule.rb', line 4 def elements @elements end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/srgs/elements/rule.rb', line 4 def id @id end |
#scope ⇒ Object
Returns the value of attribute scope.
4 5 6 |
# File 'lib/srgs/elements/rule.rb', line 4 def scope @scope end |
Instance Method Details
#<<(element) ⇒ Object
13 14 15 16 |
# File 'lib/srgs/elements/rule.rb', line 13 def <<(element) @elements << element self end |