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.
508 509 510 511 512 |
# File 'lib/cocoapods-core/specification/linter.rb', line 508 def initialize(type, ) @type = type @message = @platforms = [] end |
Instance Attribute Details
#message ⇒ String (readonly)
Returns the message associated with result.
503 504 505 |
# File 'lib/cocoapods-core/specification/linter.rb', line 503 def @message end |
#platforms ⇒ Array<Platform> (readonly)
Returns the platforms where this result was generated.
517 518 519 |
# File 'lib/cocoapods-core/specification/linter.rb', line 517 def platforms @platforms end |
#type ⇒ Symbol (readonly)
Returns the type of result.
499 500 501 |
# File 'lib/cocoapods-core/specification/linter.rb', line 499 def type @type end |
Instance Method Details
#to_s ⇒ String
Returns a string representation suitable for UI output.
521 522 523 524 525 526 527 528 529 530 |
# File 'lib/cocoapods-core/specification/linter.rb', line 521 def to_s r = "[#{type.to_s.upcase}] #{}" 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 |