class Pod::Specification::Linter::Results::Result
Attributes
attribute_name[R]
@return the name of the attribute associated with result.
message[R]
@return [String] the message associated with result.
platforms[R]
@return [Array<Platform>] the platforms where this result was
generated.
public_only[R]
@return [Boolean] whether the result only applies to public specs.
public_only?[R]
@return [Boolean] whether the result only applies to public specs.
type[R]
@return [Symbol] the type of result.
Public Class Methods
new(type, attribute_name, message, public_only = false)
click to toggle source
@param [Symbol] type @see type @param [String] message @see message
# File lib/cocoapods-core/specification/linter/result.rb, line 28 def initialize(type, attribute_name, message, public_only = false) @type = type @attribute_name = attribute_name @message = message @public_only = public_only @platforms = [] end
Public Instance Methods
to_s()
click to toggle source
@return [String] a string representation suitable for UI output.
# File lib/cocoapods-core/specification/linter/result.rb, line 43 def to_s r = "[#{type.to_s.upcase}] [#{attribute_name}] #{message}" if platforms != Specification::PLATFORMS platforms_names = platforms.uniq.map do |p| Platform.string_name(p) end r << " [#{platforms_names * ' - '}]" unless platforms.empty? end r end