Class: Calatrava::Project
- Inherits:
-
Object
- Object
- Calatrava::Project
- Defined in:
- lib/calatrava/project.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#droid ⇒ Object
readonly
Returns the value of attribute droid.
-
#ios ⇒ Object
readonly
Returns the value of attribute ios.
-
#kernel ⇒ Object
readonly
Returns the value of attribute kernel.
-
#mobile_web ⇒ Object
readonly
Returns the value of attribute mobile_web.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, overrides = {}) ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(name, overrides = {}) ⇒ Project
Returns a new instance of Project.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/calatrava/project.rb', line 15 def initialize(name, overrides = {}) @name = name @slug = name.gsub(" ", "_").downcase @title = @name[0..0].upcase + @name[1..-1] @options = {} if File.exists?(@name) && File.directory?(@name) @path = File.(@name) @options = YAML.load(IO.read(File.join(@name, 'calatrava.yml'))) @name = @options[:project_name] end @options.merge! overrides @config = Configuration.new @kernel = Kernel.new(@path) @shell = Shell.new(@path) @mobile_web = MobileWebApp.new(@path, Manifest.new(@path, 'web', @kernel, @shell)) @ios = IosApp.new(@path, Manifest.new(@path, 'ios', @kernel, @shell)) @droid = DroidApp.new(@path, @name, Manifest.new(@path, 'droid', @kernel, @shell)) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
13 14 15 |
# File 'lib/calatrava/project.rb', line 13 def config @config end |
#droid ⇒ Object (readonly)
Returns the value of attribute droid.
13 14 15 |
# File 'lib/calatrava/project.rb', line 13 def droid @droid end |
#ios ⇒ Object (readonly)
Returns the value of attribute ios.
13 14 15 |
# File 'lib/calatrava/project.rb', line 13 def ios @ios end |
#kernel ⇒ Object (readonly)
Returns the value of attribute kernel.
13 14 15 |
# File 'lib/calatrava/project.rb', line 13 def kernel @kernel end |
#mobile_web ⇒ Object (readonly)
Returns the value of attribute mobile_web.
13 14 15 |
# File 'lib/calatrava/project.rb', line 13 def mobile_web @mobile_web end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/calatrava/project.rb', line 13 def name @name end |