Class: Pod::Bazel::Util::SortKey
- Inherits:
-
Object
- Object
- Pod::Bazel::Util::SortKey
- Defined in:
- lib/cocoapods/bazel/util.rb
Instance Attribute Summary collapse
-
#original_index ⇒ Object
readonly
Returns the value of attribute original_index.
-
#phase ⇒ Object
readonly
Returns the value of attribute phase.
-
#split ⇒ Object
readonly
Returns the value of attribute split.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(string, index) ⇒ SortKey
constructor
A new instance of SortKey.
Constructor Details
#initialize(string, index) ⇒ SortKey
Returns a new instance of SortKey.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/cocoapods/bazel/util.rb', line 28 def initialize(string, index) @value = string @original_index = index @phase = if string.start_with?(':') 1 elsif string.start_with?('//') 2 elsif string.start_with?('@') 3 else 4 end @split = string.split(/[:.]/) end |
Instance Attribute Details
#original_index ⇒ Object (readonly)
Returns the value of attribute original_index.
26 27 28 |
# File 'lib/cocoapods/bazel/util.rb', line 26 def original_index @original_index end |
#phase ⇒ Object (readonly)
Returns the value of attribute phase.
26 27 28 |
# File 'lib/cocoapods/bazel/util.rb', line 26 def phase @phase end |
#split ⇒ Object (readonly)
Returns the value of attribute split.
26 27 28 |
# File 'lib/cocoapods/bazel/util.rb', line 26 def split @split end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
26 27 28 |
# File 'lib/cocoapods/bazel/util.rb', line 26 def value @value end |