Class: HtmlMockup::Project
- Inherits:
-
Object
- Object
- HtmlMockup::Project
- Defined in:
- lib/html_mockup/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/html_mockup/project.rb', line 19 def initialize(path, ={}) @path = Pathname.new(path) @options = { :html_path => @path + "html", :partial_path => @path + "partials", :layouts_path => @path + "layouts" } # Clumsy string to symbol key conversion .each{|k,v| @options[k.is_a?(String) ? k.to_sym : k] = v } self.html_path = @options[:html_path] self.partial_path = @options[:partials_path] || @options[:partial_path] || self.html_path + "../partials/" self.layouts_path = @options[:layouts_path] self.shell = @options[:shell] load_mockup! end |
Instance Attribute Details
#html_path ⇒ Object
13 14 15 |
# File 'lib/html_mockup/project.rb', line 13 def html_path @html_path end |
#layouts_path ⇒ Object
13 14 15 |
# File 'lib/html_mockup/project.rb', line 13 def layouts_path @layouts_path end |
#mockupfile ⇒ Object
13 14 15 |
# File 'lib/html_mockup/project.rb', line 13 def mockupfile @mockupfile end |
#options ⇒ Object
Returns the value of attribute options.
17 18 19 |
# File 'lib/html_mockup/project.rb', line 17 def @options end |
#partial_path ⇒ Object Also known as: partials_path
13 14 15 |
# File 'lib/html_mockup/project.rb', line 13 def partial_path @partial_path end |
#path ⇒ Object
13 14 15 |
# File 'lib/html_mockup/project.rb', line 13 def path @path end |
#shell ⇒ Object
Returns the value of attribute shell.
15 16 17 |
# File 'lib/html_mockup/project.rb', line 15 def shell @shell end |