Class: XRay::JS::Rule::All
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- XRay::JS::Rule::All
- Defined in:
- lib/js/rule/all.rb
Instance Attribute Summary collapse
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ All
constructor
A new instance of All.
- #load_sub_rules ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ All
Returns a new instance of All.
11 12 13 14 15 16 17 18 19 |
# File 'lib/js/rule/all.rb', line 11 def initialize( = {}) @rules = load_sub_rules.collect do |name| klass = Rule.const_get name klass.method(:initialize).arity >= 1 ? klass.new() : klass.new end super @rules end |
Instance Attribute Details
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
9 10 11 |
# File 'lib/js/rule/all.rb', line 9 def rules @rules end |