Class: Geri::Config::Site

Inherits:
Object
  • Object
show all
Defined in:
lib/geri/config/site.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#domainObject (readonly)

Returns the value of attribute domain.



4
5
6
# File 'lib/geri/config/site.rb', line 4

def domain
  @domain
end

#mount_pointObject (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

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/geri/config/site.rb', line 5

def name
  @name
end

#rootObject (readonly)

Returns the value of attribute root.



4
5
6
# File 'lib/geri/config/site.rb', line 4

def root
  @root
end