Class: Pod::Specification::Linter::Result
- Inherits:
-
Object
- Object
- Pod::Specification::Linter::Result
- Defined in:
- lib/cocoapods-core/specification/linter.rb
Overview
———————————————————————–#
Root spec validation helpers collapse
-
#message ⇒ String
readonly
The message associated with result.
-
#platforms ⇒ Array<Platform>
readonly
The platforms where this result was generated.
-
#type ⇒ Symbol
readonly
The type of result.
Root spec validation helpers collapse
-
#initialize(type, message) ⇒ Result
constructor
A new instance of Result.
-
#to_s ⇒ String
A string representation suitable for UI output.
Constructor Details
#initialize(type, message) ⇒ Result
Returns a new instance of Result.
386 387 388 389 390 |
# File 'lib/cocoapods-core/specification/linter.rb', line 386 def initialize(type, ) @type = type @message = @platforms = [] end |
Instance Attribute Details
#message ⇒ String (readonly)
Returns the message associated with result.
381 382 383 |
# File 'lib/cocoapods-core/specification/linter.rb', line 381 def @message end |
#platforms ⇒ Array<Platform> (readonly)
Returns the platforms where this result was generated.
395 396 397 |
# File 'lib/cocoapods-core/specification/linter.rb', line 395 def platforms @platforms end |
#type ⇒ Symbol (readonly)
Returns the type of result.
377 378 379 |
# File 'lib/cocoapods-core/specification/linter.rb', line 377 def type @type end |
Instance Method Details
#to_s ⇒ String
Returns a string representation suitable for UI output.
399 400 401 402 403 404 405 406 |
# File 'lib/cocoapods-core/specification/linter.rb', line 399 def to_s r = "[#{type.to_s.upcase}] #{}" if platforms != Specification::PLATFORMS platforms_names = platforms.uniq.map { |p| Platform.string_name(p) } r << " [#{platforms_names * ' - '}]" unless platforms.empty? end r end |