Class: TZInfo::TZDataRuleSet
- Inherits:
-
TZDataRules
- Object
- TZDataRules
- TZInfo::TZDataRuleSet
- Defined in:
- lib/tzinfo/tzdataparser.rb
Overview
A rule set (as defined by Rule name in the tz data).
Instance Attribute Summary collapse
-
#rules ⇒ Object
readonly
:nodoc:.
Attributes inherited from TZDataRules
Instance Method Summary collapse
-
#add_rule(rule) ⇒ Object
Adds a new rule to the set.
- #count ⇒ Object
- #each ⇒ Object
-
#initialize(name) ⇒ TZDataRuleSet
constructor
A new instance of TZDataRuleSet.
Constructor Details
#initialize(name) ⇒ TZDataRuleSet
Returns a new instance of TZDataRuleSet.
382 383 384 385 |
# File 'lib/tzinfo/tzdataparser.rb', line 382 def initialize(name) super @rules = [] end |
Instance Attribute Details
#rules ⇒ Object (readonly)
:nodoc:
380 381 382 |
# File 'lib/tzinfo/tzdataparser.rb', line 380 def rules @rules end |
Instance Method Details
#add_rule(rule) ⇒ Object
Adds a new rule to the set.
388 389 390 |
# File 'lib/tzinfo/tzdataparser.rb', line 388 def add_rule(rule) @rules << rule end |
#count ⇒ Object
392 393 394 |
# File 'lib/tzinfo/tzdataparser.rb', line 392 def count @rules.length end |
#each ⇒ Object
396 397 398 |
# File 'lib/tzinfo/tzdataparser.rb', line 396 def each @rules.each {|rule| yield rule} end |