Class: Xcvm::Project
- Inherits:
-
Object
- Object
- Xcvm::Project
- Defined in:
- lib/xcvm/project.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
- #build ⇒ Object
- #build=(value) ⇒ Object
-
#initialize(file) ⇒ Project
constructor
A new instance of Project.
- #save ⇒ Object
- #version ⇒ Object
- #version=(value) ⇒ Object
Constructor Details
#initialize(file) ⇒ Project
Returns a new instance of Project.
10 11 12 |
# File 'lib/xcvm/project.rb', line 10 def initialize(file) @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
8 9 10 |
# File 'lib/xcvm/project.rb', line 8 def file @file end |
Instance Method Details
#build ⇒ Object
25 26 27 28 29 30 |
# File 'lib/xcvm/project.rb', line 25 def build if @build == nil then @build = Xcvm::Build.new(info['CFBundleVersion'].to_i) end return @build end |
#build=(value) ⇒ Object
32 33 34 |
# File 'lib/xcvm/project.rb', line 32 def build=(value) @build = value end |
#save ⇒ Object
36 37 38 39 40 |
# File 'lib/xcvm/project.rb', line 36 def save info['CFBundleShortVersionString'] = version.to_s info['CFBundleVersion'] = build.to_s File.open(@file, 'w') { |file| file.write(info.to_plist) } end |
#version ⇒ Object
14 15 16 17 18 19 |
# File 'lib/xcvm/project.rb', line 14 def version if @version == nil then @version = Xcvm::SemanticVersion.new(info['CFBundleShortVersionString']) end return @version end |
#version=(value) ⇒ Object
21 22 23 |
# File 'lib/xcvm/project.rb', line 21 def version=(value) @version = value end |