Class: Pod::Specification::Linter::Result
- Inherits:
-
Object
- Object
- Pod::Specification::Linter::Result
- Defined in:
- lib/cocoapods-core/specification/linter/result.rb
Instance Attribute Summary 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.
Instance Method Summary 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.
16 17 18 19 20 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 16 def initialize(type, ) @type = type @message = @platforms = [] end |
Instance Attribute Details
#message ⇒ String (readonly)
Returns the message associated with result.
11 12 13 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 11 def @message end |
#platforms ⇒ Array<Platform> (readonly)
Returns the platforms where this result was generated.
25 26 27 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 25 def platforms @platforms end |
#type ⇒ Symbol (readonly)
Returns the type of result.
7 8 9 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 7 def type @type end |
Instance Method Details
#to_s ⇒ String
Returns a string representation suitable for UI output.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/cocoapods-core/specification/linter/result.rb', line 29 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 |