Class: Razor::Site
- Defined in:
- lib/razor/generable.rb
Instance Attribute Summary collapse
-
#dest ⇒ Object
readonly
Returns the value of attribute dest.
-
#src ⇒ Object
readonly
Returns the value of attribute src.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from Directory
Attributes inherited from Generable
Instance Method Summary collapse
-
#initialize(src, dest, url_base = '/') ⇒ Site
constructor
A new instance of Site.
Methods inherited from Directory
Methods inherited from Generable
Constructor Details
#initialize(src, dest, url_base = '/') ⇒ Site
Returns a new instance of Site.
97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/razor/generable.rb', line 97 def initialize(src, dest, url_base='/') View.reset_instances! @src, @dest, @url = src, dest, url_base View.layouts_path = File.join(src, '_layouts/') View.url_base = url Razor.load '_init.rb' rescue nil rescue LoadError $!. =~ /^no such file to load -- (.+)$/ puts "Can't load #{$1} file" ensure super(nil, nil) end |
Instance Attribute Details
#dest ⇒ Object (readonly)
Returns the value of attribute dest.
96 97 98 |
# File 'lib/razor/generable.rb', line 96 def dest @dest end |
#src ⇒ Object (readonly)
Returns the value of attribute src.
96 97 98 |
# File 'lib/razor/generable.rb', line 96 def src @src end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
96 97 98 |
# File 'lib/razor/generable.rb', line 96 def url @url end |