Class: Geri::Config::Site
- Inherits:
-
Object
- Object
- Geri::Config::Site
- Defined in:
- lib/geri/config/site.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#mount_point ⇒ Object
readonly
Returns the value of attribute mount_point.
-
#name ⇒ Object
Returns the value of attribute name.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize(domain, mount_point) ⇒ Site
constructor
A new instance of Site.
Constructor Details
#initialize(domain, mount_point) ⇒ Site
Returns a new instance of Site.
7 8 9 10 11 12 13 14 15 |
# File 'lib/geri/config/site.rb', line 7 def initialize(domain, mount_point) @domain = domain @mount_point = mount_point if @mount_point == '/' @root = Rails.root.join('app', 'site') else @root = Rails.root.join('app', 'site', *@mount_point.split('/')) end end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
4 5 6 |
# File 'lib/geri/config/site.rb', line 4 def domain @domain end |
#mount_point ⇒ Object (readonly)
Returns the value of attribute mount_point.
4 5 6 |
# File 'lib/geri/config/site.rb', line 4 def mount_point @mount_point end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/geri/config/site.rb', line 5 def name @name end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
4 5 6 |
# File 'lib/geri/config/site.rb', line 4 def root @root end |