polyrex-calendar 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/polyrex-calendar.rb +3 -2
- metadata +1 -1
data/lib/polyrex-calendar.rb
CHANGED
@@ -24,11 +24,12 @@ class PolyrexCalendar
|
|
24
24
|
def to_webpage()
|
25
25
|
|
26
26
|
# transform the xml to html
|
27
|
+
lib = File.join(File.dirname(__FILE__), '..', 'lib')
|
27
28
|
|
28
29
|
doc = Nokogiri::XML(@xml)
|
29
|
-
xslt = Nokogiri::XSLT(open('calendar.xsl','r'))
|
30
|
+
xslt = Nokogiri::XSLT(File.open(lib + '/calendar.xsl','r').read)
|
30
31
|
html = xslt.transform(doc).to_xml
|
31
|
-
css = File.open('layout.css','r').read
|
32
|
+
css = File.open(lib + '/layout.css','r').read
|
32
33
|
|
33
34
|
{'calendar.html' => html, 'layout.css' => css}
|
34
35
|
end
|