Class: Pod::Bazel::Util::SortKey

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/bazel/util.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_indexObject (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

#phaseObject (readonly)

Returns the value of attribute phase.



26
27
28
# File 'lib/cocoapods/bazel/util.rb', line 26

def phase
  @phase
end

#splitObject (readonly)

Returns the value of attribute split.



26
27
28
# File 'lib/cocoapods/bazel/util.rb', line 26

def split
  @split
end

#valueObject (readonly)

Returns the value of attribute value.



26
27
28
# File 'lib/cocoapods/bazel/util.rb', line 26

def value
  @value
end