Class: Roger::Project
- Inherits:
-
Object
- Object
- Roger::Project
- Defined in:
- lib/roger/project.rb
Overview
Loader for mockupfile and project dependencies
Instance Attribute Summary collapse
- #html_path ⇒ Object
- #layouts_path ⇒ Object
- #mockupfile ⇒ Object
-
#options ⇒ Object
Returns the value of attribute options.
- #partial_path ⇒ Object (also: #partials_path)
- #path ⇒ Object
-
#shell ⇒ Object
Returns the value of attribute shell.
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ Project
constructor
A new instance of Project.
- #release ⇒ Object
- #server ⇒ Object
Constructor Details
#initialize(path, options = {}) ⇒ Project
Returns a new instance of Project.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/roger/project.rb', line 19 def initialize(path, ={}) @path = Pathname.new(path) = { :html_path => @path + "html", :partial_path => @path + "partials", :layouts_path => @path + "layouts" } # Clumsy string to symbol key conversion .each{|k,v| [k.is_a?(String) ? k.to_sym : k] = v } self.html_path = [:html_path] self.partial_path = [:partials_path] || [:partial_path] || self.html_path + "../partials/" self.layouts_path = [:layouts_path] self.shell = [:shell] load_mockup! end |
Instance Attribute Details
#html_path ⇒ Object
13 14 15 |
# File 'lib/roger/project.rb', line 13 def html_path @html_path end |
#layouts_path ⇒ Object
13 14 15 |
# File 'lib/roger/project.rb', line 13 def layouts_path @layouts_path end |
#mockupfile ⇒ Object
13 14 15 |
# File 'lib/roger/project.rb', line 13 def mockupfile @mockupfile end |
#options ⇒ Object
Returns the value of attribute options.
17 18 19 |
# File 'lib/roger/project.rb', line 17 def end |
#partial_path ⇒ Object Also known as: partials_path
13 14 15 |
# File 'lib/roger/project.rb', line 13 def partial_path @partial_path end |
#path ⇒ Object
13 14 15 |
# File 'lib/roger/project.rb', line 13 def path @path end |
#shell ⇒ Object
Returns the value of attribute shell.
15 16 17 |
# File 'lib/roger/project.rb', line 15 def shell @shell end |
Instance Method Details
#release ⇒ Object
48 49 50 51 |
# File 'lib/roger/project.rb', line 48 def release = [:release] || {} @release ||= Release.new(self, ) end |
#server ⇒ Object
43 44 45 46 |
# File 'lib/roger/project.rb', line 43 def server = [:server] || {} @server ||= Server.new(self, ) end |