Class: Ulysses::Sheet
- Inherits:
-
Object
- Object
- Ulysses::Sheet
- Defined in:
- lib/ulysses/sheet.rb
Instance Attribute Summary collapse
-
#dirname ⇒ Object
readonly
Returns the value of attribute dirname.
Instance Method Summary collapse
-
#initialize(dirname) ⇒ Sheet
constructor
A new instance of Sheet.
- #markup ⇒ Object
- #reload ⇒ Object
- #to_html ⇒ Object
- #xml ⇒ Object
Constructor Details
#initialize(dirname) ⇒ Sheet
Returns a new instance of Sheet.
6 7 8 |
# File 'lib/ulysses/sheet.rb', line 6 def initialize(dirname) @dirname = dirname end |
Instance Attribute Details
#dirname ⇒ Object (readonly)
Returns the value of attribute dirname.
4 5 6 |
# File 'lib/ulysses/sheet.rb', line 4 def dirname @dirname end |
Instance Method Details
#markup ⇒ Object
10 11 12 |
# File 'lib/ulysses/sheet.rb', line 10 def markup @markup ||= parse_markup end |
#reload ⇒ Object
22 23 24 |
# File 'lib/ulysses/sheet.rb', line 22 def reload @markup, @xml, @html = nil end |
#to_html ⇒ Object
18 19 20 |
# File 'lib/ulysses/sheet.rb', line 18 def to_html @html ||= Exporter.new(xml).to_html end |
#xml ⇒ Object
14 15 16 |
# File 'lib/ulysses/sheet.rb', line 14 def xml @xml ||= Nokogiri::XML(File.read(File.join(@dirname, 'Content.xml'))) end |