Class: Calendar
- Inherits:
-
Polyrex
- Object
- Polyrex
- Calendar
- Includes:
- LIBRARY2
- Defined in:
- lib/polyrex_calendarbase.rb
Instance Attribute Summary collapse
-
#css_layout ⇒ Object
Returns the value of attribute css_layout.
-
#css_style ⇒ Object
Returns the value of attribute css_style.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#xslt ⇒ Object
Returns the value of attribute xslt.
Instance Method Summary collapse
Methods included from LIBRARY2
#fetch_file, #fetch_filepath, #generate_webpage, #read
Instance Attribute Details
#css_layout ⇒ Object
Returns the value of attribute css_layout.
144 145 146 |
# File 'lib/polyrex_calendarbase.rb', line 144 def css_layout @css_layout end |
#css_style ⇒ Object
Returns the value of attribute css_style.
144 145 146 |
# File 'lib/polyrex_calendarbase.rb', line 144 def css_style @css_style end |
#filename ⇒ Object
Returns the value of attribute filename.
144 145 146 |
# File 'lib/polyrex_calendarbase.rb', line 144 def filename @filename end |
#xslt ⇒ Object
Returns the value of attribute xslt.
144 145 146 |
# File 'lib/polyrex_calendarbase.rb', line 144 def xslt @xslt end |
Instance Method Details
#inspect ⇒ Object
148 149 150 |
# File 'lib/polyrex_calendarbase.rb', line 148 def inspect() "#<Calendar:%s" % __id__ end |
#month(n) ⇒ Object
152 153 154 |
# File 'lib/polyrex_calendarbase.rb', line 152 def month(n) self.records[n-1] end |
#to_webpage ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/polyrex_calendarbase.rb', line 156 def to_webpage() year_xsl = read(self.xslt) year_layout_css = fetch_file self.css_layout year_css = fetch_file self.css_style File.open('self.xml','w'){|f| f.write (self.to_xml pretty: true)} File.open(File.basename(self.xslt),'w'){|f| f.write year_xsl } #html = Rexslt.new(month_xsl, self.to_xml).to_xml html = generate_webpage self.to_xml, year_xsl {self.filename => html, self.css_layout => year_layout_css, self.css_style => year_css} end |