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