Module: LIBRARY2
- Defined in:
- lib/polyrex-calendar.rb
Instance Method Summary collapse
- #fetch_file(filename) ⇒ Object
- #fetch_filepath(filename) ⇒ Object
- #generate_webpage(xml, xsl) ⇒ Object
- #read(s) ⇒ Object
Instance Method Details
#fetch_file(filename) ⇒ Object
17 18 19 20 21 |
# File 'lib/polyrex-calendar.rb', line 17 def fetch_file(filename) filepath = fetch_filepath filename read filepath end |
#fetch_filepath(filename) ⇒ Object
11 12 13 14 15 |
# File 'lib/polyrex-calendar.rb', line 11 def fetch_filepath(filename) lib = File.dirname(__FILE__) File.join(lib,'..','stylesheet',filename) end |
#generate_webpage(xml, xsl) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/polyrex-calendar.rb', line 24 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
32 33 34 |
# File 'lib/polyrex-calendar.rb', line 32 def read(s) RXFHelper.read(s).first end |