Class: SmartCore::Schema::Checker::Rules::Verifier::Result Private
- Inherits:
-
Object
- Object
- SmartCore::Schema::Checker::Rules::Verifier::Result
- Includes:
- Enumerable
- Defined in:
- lib/smart_core/schema/checker/rules/verifier/result.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #results ⇒ Array<SmartCore::Schema::Checker::Rules::Result::Base> readonly private
- #rule ⇒ SmartCore::Schema::Checker::Rules::Base readonly private
Instance Method Summary collapse
- #add(result) ⇒ result (also: #<<) private
- #each(&block) {|result| ... } ⇒ Enumerable (also: #each_result) private
- #failure? ⇒ Boolean
- #initialize(rule) ⇒ void constructor private
- #key ⇒ String private
- #success? ⇒ Boolean
Constructor Details
#initialize(rule) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 25 def initialize(rule) @rule = rule @results = [] end |
Instance Attribute Details
#results ⇒ Array<SmartCore::Schema::Checker::Rules::Result::Base> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 13 def results @results end |
#rule ⇒ SmartCore::Schema::Checker::Rules::Base (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 19 def rule @rule end |
Instance Method Details
#add(result) ⇒ result Also known as: <<
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 43 def add(result) result.tap { results << result } end |
#each(&block) {|result| ... } ⇒ Enumerable Also known as: each_result
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
55 56 57 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 55 def each(&block) block_given? ? results.each(&block) : results.each end |
#failure? ⇒ Boolean
72 73 74 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 72 def failure? results.all?(&:failure?) end |
#key ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 34 def key rule.schema_key end |
#success? ⇒ Boolean
64 65 66 |
# File 'lib/smart_core/schema/checker/rules/verifier/result.rb', line 64 def success? results.all?(&:success?) end |