Class: QCloudHive::XCodeProject
- Inherits:
-
Object
- Object
- QCloudHive::XCodeProject
- Defined in:
- lib/qcloudhive/xcodeproj.rb
Instance Attribute Summary collapse
-
#hiveSpecModules ⇒ Object
readonly
Returns the value of attribute hiveSpecModules.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ XCodeProject
constructor
A new instance of XCodeProject.
- #podfile ⇒ Object
- #saveHiveModulesConfig ⇒ Object
Constructor Details
#initialize(path) ⇒ XCodeProject
Returns a new instance of XCodeProject.
87 88 89 90 91 |
# File 'lib/qcloudhive/xcodeproj.rb', line 87 def initialize(path) @path = path @podfile = nil @hiveSpecModules = nil end |
Instance Attribute Details
#hiveSpecModules ⇒ Object (readonly)
Returns the value of attribute hiveSpecModules.
17 18 19 |
# File 'lib/qcloudhive/xcodeproj.rb', line 17 def hiveSpecModules @hiveSpecModules end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/qcloudhive/xcodeproj.rb', line 16 def path @path end |
Instance Method Details
#podfile ⇒ Object
18 19 20 21 22 23 |
# File 'lib/qcloudhive/xcodeproj.rb', line 18 def podfile if @podfile.nil? @podfile = Pod::Podfile.from_file(Pathname(@path).join("Podfile").to_path) end @podfile end |
#saveHiveModulesConfig ⇒ Object
93 94 95 96 97 98 99 100 101 |
# File 'lib/qcloudhive/xcodeproj.rb', line 93 def saveHiveModulesConfig config = "" hiveSpecModules.each { |e| config += "\n#{e.toConfig}" } File.open(Pathname.new(@path).join(QCloudHive::HIVE_MODULES_FILE_NAME).to_s, "w") { |f| f.write config } end |