polyrex-calendar 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|