Class: Pod::Specification::Linter::Results

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/cocoapods-core/specification/linter/result.rb

Defined Under Namespace

Classes: Result

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResults

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

#consumerSpecification::Consumer

Returns the current consumer.

Returns:



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.

Parameters:

  • message (String)

    The message of the result.



81
82
83
# File 'lib/cocoapods-core/specification/linter/result.rb', line 81

def add_error(attribute_name, message, public_only = false)
  add_result(:error, attribute_name, message, 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.

Parameters:

  • message (String)

    The message of the result.



92
93
94
# File 'lib/cocoapods-core/specification/linter/result.rb', line 92

def add_warning(attribute_name, message, public_only = false)
  add_result(:warning, attribute_name, message, public_only)
end

#eachObject



62
63
64
# File 'lib/cocoapods-core/specification/linter/result.rb', line 62

def each
  results.each { |r| yield r }
end

#empty?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/cocoapods-core/specification/linter/result.rb', line 66

def empty?
  results.empty?
end