Class: Xcode::Project::BuildNumber
Constant Summary
collapse
- KEY =
'CFBundleVersion'
Instance Attribute Summary collapse
Attributes inherited from PlistChanger
#plist_path
Instance Method Summary
collapse
#initialize, #read, #write
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
4
5
6
|
# File 'lib/xcode/project/build_number.rb', line 4
def number
@number
end
|
Instance Method Details
#increment ⇒ Object
21
22
23
24
|
# File 'lib/xcode/project/build_number.rb', line 21
def increment
@number += 1
self
end
|
#set(string) ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/xcode/project/build_number.rb', line 12
def set(string)
if /^(\d+)/ =~ string
@number = $1.to_i
self
else
raise "Can't parse build number #{string.inspect}"
end
end
|
#to_s ⇒ Object
8
9
10
|
# File 'lib/xcode/project/build_number.rb', line 8
def to_s
number.to_s
end
|