Module: LIBRARY2

Included in:
Calendar, PolyrexCalendarBase, PolyrexObjects::Month
Defined in:
lib/polyrex_calendarbase.rb

Instance Method Summary collapse

Instance Method Details

#fetch_file(filename) ⇒ Object



22
23
24
25
26
# File 'lib/polyrex_calendarbase.rb', line 22

def fetch_file(filename)

  filepath = fetch_filepath filename
  read filepath
end

#fetch_filepath(filename) ⇒ Object



15
16
17
18
19
20
# File 'lib/polyrex_calendarbase.rb', line 15

def fetch_filepath(filename)

  lib = File.dirname(__FILE__)    
  File.join(lib,'..','stylesheet',filename)

end

#generate_webpage(xml, xsl) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/polyrex_calendarbase.rb', line 28

def generate_webpage(xml, xsl)
  
  # transform the xml to html
  doc = Nokogiri::XML(xml)
  xslt  = Nokogiri::XSLT(xsl)
  xslt.transform(doc).to_s   
end

#read(s) ⇒ Object



36
37
38
# File 'lib/polyrex_calendarbase.rb', line 36

def read(s)
  RXFHelper.read(s).first
end