Class: StringSatisfy::Rule
- Inherits:
-
Object
- Object
- StringSatisfy::Rule
- Defined in:
- lib/string_satisfy/rule.rb
Overview
Base class for rule
Instance Method Summary collapse
-
#initialize(*args) ⇒ Rule
constructor
A new instance of Rule.
- #normal_objects ⇒ Object
- #rule_objects ⇒ Object
Constructor Details
#initialize(*args) ⇒ Rule
Returns a new instance of Rule.
4 5 6 |
# File 'lib/string_satisfy/rule.rb', line 4 def initialize(*args) @rules_array = args.uniq end |
Instance Method Details
#normal_objects ⇒ Object
12 13 14 |
# File 'lib/string_satisfy/rule.rb', line 12 def normal_objects @rules_array - rule_objects end |
#rule_objects ⇒ Object
8 9 10 |
# File 'lib/string_satisfy/rule.rb', line 8 def rule_objects @rules_array.select {|ele| ele.kind_of? Rule } end |