Class: Roger::Project
- Inherits:
-
Object
- Object
- Roger::Project
- Defined in:
- lib/roger/project.rb
Overview
Loader for rogerfile and project dependencies
Direct Known Subclasses
Instance Attribute Summary collapse
- #html_path ⇒ Object
- #layouts_path ⇒ Object
- #mode ⇒ Object
-
#options ⇒ Object
Returns the value of attribute options.
- #partial_path ⇒ Object (also: #partials_path)
- #path ⇒ Object
- #rogerfile ⇒ Object
- #rogerfile_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(options = {}) ⇒ Object
- #server(options = {}) ⇒ Object
- #test(options = {}) ⇒ Object
Constructor Details
#initialize(path, options = {}) ⇒ Project
Returns a new instance of Project.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/roger/project.rb', line 24 def initialize(path, = {}) @path = Pathname.new(path) @options = { html_path: @path + "html", partial_path: @path + "partials", layouts_path: @path + "layouts", rogerfile_path: @path + "Rogerfile", renderer: {}, server: {}, release: {}, test: {} } # Clumsy string to symbol key conversion .each { |k, v| @options[k.is_a?(String) ? k.to_sym : k] = v } initialize_accessors initialize_rogerfile_path initialize_roger end |
Instance Attribute Details
#html_path ⇒ Object
17 18 19 |
# File 'lib/roger/project.rb', line 17 def html_path @html_path end |
#layouts_path ⇒ Object
17 18 19 |
# File 'lib/roger/project.rb', line 17 def layouts_path @layouts_path end |
#mode ⇒ Object
17 18 19 |
# File 'lib/roger/project.rb', line 17 def mode @mode end |
#options ⇒ Object
Returns the value of attribute options.
22 23 24 |
# File 'lib/roger/project.rb', line 22 def @options end |
#partial_path ⇒ Object Also known as: partials_path
17 18 19 |
# File 'lib/roger/project.rb', line 17 def partial_path @partial_path end |
#path ⇒ Object
17 18 19 |
# File 'lib/roger/project.rb', line 17 def path @path end |
#rogerfile ⇒ Object
17 18 19 |
# File 'lib/roger/project.rb', line 17 def rogerfile @rogerfile end |
#rogerfile_path ⇒ Object
17 18 19 |
# File 'lib/roger/project.rb', line 17 def rogerfile_path @rogerfile_path end |
#shell ⇒ Object
Returns the value of attribute shell.
20 21 22 |
# File 'lib/roger/project.rb', line 20 def shell @shell end |
Instance Method Details
#release(options = {}) ⇒ Object
54 55 56 |
# File 'lib/roger/project.rb', line 54 def release( = {}) @release ||= Release.new(self, (, :release)) end |