Class: Pod::Specification::Linter::Results
- Inherits:
-
Object
- Object
- Pod::Specification::Linter::Results
- Includes:
- Enumerable
- Defined in:
- lib/cocoapods-core/specification/linter/result.rb
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
-
#consumer ⇒ Specification::Consumer
The current consumer.
Instance Method Summary collapse
-
#add_error(attribute_name, message, public_only = false) ⇒ void
Adds an error result with the given message.
-
#add_warning(attribute_name, message, public_only = false) ⇒ void
Adds a warning result with the given message.
- #each ⇒ Object
- #empty? ⇒ Boolean
-
#initialize ⇒ Results
constructor
A new instance of Results.
Constructor Details
#initialize ⇒ Results
Returns a new instance of Results.
55 56 57 58 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 55 def initialize @results = [] @consumer = nil end |
Instance Attribute Details
#consumer ⇒ Specification::Consumer
Returns the current consumer.
72 73 74 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 72 def consumer @consumer end |
Instance Method Details
#add_error(attribute_name, message, public_only = false) ⇒ void
This method returns an undefined value.
Adds an error result with the given message.
81 82 83 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 81 def add_error(attribute_name, , public_only = false) add_result(:error, attribute_name, , public_only) end |
#add_warning(attribute_name, message, public_only = false) ⇒ void
This method returns an undefined value.
Adds a warning result with the given message.
92 93 94 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 92 def add_warning(attribute_name, , public_only = false) add_result(:warning, attribute_name, , public_only) end |
#each ⇒ Object
62 63 64 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 62 def each results.each { |r| yield r } end |
#empty? ⇒ Boolean
66 67 68 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 66 def empty? results.empty? end |