Class: Pod::YamlPod

Inherits:
Object
  • Object
show all
Defined in:
lib/core_blur/yaml/yaml_pod.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pod) ⇒ YamlPod

Returns a new instance of YamlPod.



3
4
5
# File 'lib/core_blur/yaml/yaml_pod.rb', line 3

def initialize(pod)
  @pod = pod
end

Instance Attribute Details

#binaryObject

Returns the value of attribute binary.



18
19
20
# File 'lib/core_blur/yaml/yaml_pod.rb', line 18

def binary
  @binary
end

#branchObject

Returns the value of attribute branch.



12
13
14
# File 'lib/core_blur/yaml/yaml_pod.rb', line 12

def branch
  @branch
end

#configurationsObject

Returns the value of attribute configurations.



14
15
16
# File 'lib/core_blur/yaml/yaml_pod.rb', line 14

def configurations
  @configurations
end

#gitObject

Returns the value of attribute git.



10
11
12
# File 'lib/core_blur/yaml/yaml_pod.rb', line 10

def git
  @git
end

#inhibit_warningsObject

Returns the value of attribute inhibit_warnings.



16
17
18
# File 'lib/core_blur/yaml/yaml_pod.rb', line 16

def inhibit_warnings
  @inhibit_warnings
end

#module_nameObject

Returns the value of attribute module_name.



6
7
8
# File 'lib/core_blur/yaml/yaml_pod.rb', line 6

def module_name
  @module_name
end

#pathObject

Returns the value of attribute path.



15
16
17
# File 'lib/core_blur/yaml/yaml_pod.rb', line 15

def path
  @path
end

#podObject

Returns the value of attribute pod.



7
8
9
# File 'lib/core_blur/yaml/yaml_pod.rb', line 7

def pod
  @pod
end

#podspecObject

Returns the value of attribute podspec.



13
14
15
# File 'lib/core_blur/yaml/yaml_pod.rb', line 13

def podspec
  @podspec
end

#sourceObject

Returns the value of attribute source.



17
18
19
# File 'lib/core_blur/yaml/yaml_pod.rb', line 17

def source
  @source
end

#subspecsObject

Returns the value of attribute subspecs.



8
9
10
# File 'lib/core_blur/yaml/yaml_pod.rb', line 8

def subspecs
  @subspecs
end

#tagObject

Returns the value of attribute tag.



11
12
13
# File 'lib/core_blur/yaml/yaml_pod.rb', line 11

def tag
  @tag
end

#typeObject (readonly)

Returns the value of attribute type.



19
20
21
# File 'lib/core_blur/yaml/yaml_pod.rb', line 19

def type
  @type
end

#versionObject

Returns the value of attribute version.



9
10
11
# File 'lib/core_blur/yaml/yaml_pod.rb', line 9

def version
  @version
end

Instance Method Details

#optionObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/core_blur/yaml/yaml_pod.rb', line 20

def option
  result = {:configurations => self.configurations,
            :inhibit_warnings => self.inhibit_warnings,
            :subspecs => self.subspecs}
  if self.path #路径依赖
    result[:path] = self.path
  elsif self.podspec #podspec引用
    result[:podspec] = self.podspec
  elsif self.version #版本号依赖
    result[:source] = self.source
  elsif self.git #git仓库引用
    result[:git] = self.git
    if self.tag #tag引用
      result[:tag] = self.tag
    else #分支引用 或着未指定分支 也按分支引用
      result[:branch] = self.branch
    end
  end
  result
end