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.
390 391 392 393 394 |
# File 'lib/cocoapods-core/specification/linter.rb', line 390 def initialize(type, ) @type = type @message = @platforms = [] end |
Instance Attribute Details
#message ⇒ String (readonly)
Returns the message associated with result.
385 386 387 |
# File 'lib/cocoapods-core/specification/linter.rb', line 385 def @message end |
#platforms ⇒ Array<Platform> (readonly)
Returns the platforms where this result was generated.
399 400 401 |
# File 'lib/cocoapods-core/specification/linter.rb', line 399 def platforms @platforms end |
#type ⇒ Symbol (readonly)
Returns the type of result.
381 382 383 |
# File 'lib/cocoapods-core/specification/linter.rb', line 381 def type @type end |
Instance Method Details
#to_s ⇒ String
Returns a string representation suitable for UI output.
403 404 405 406 407 408 409 410 |
# File 'lib/cocoapods-core/specification/linter.rb', line 403 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 |