Class: LibXML::XML::XSLT::Stylesheet

Inherits:
Object
  • Object
show all
Defined in:
lib/libxslt/deprecated.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stylesheet) ⇒ Stylesheet

Returns a new instance of Stylesheet.



39
40
41
# File 'lib/libxslt/deprecated.rb', line 39

def initialize(stylesheet)
  @stylesheet = stylesheet
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



37
38
39
# File 'lib/libxslt/deprecated.rb', line 37

def doc
  @doc
end

#filenameObject

Returns the value of attribute filename.



37
38
39
# File 'lib/libxslt/deprecated.rb', line 37

def filename
  @filename
end

Instance Method Details

#applyObject



52
53
54
# File 'lib/libxslt/deprecated.rb', line 52

def apply
  @result = @stylesheet.apply(@doc)
end

#parseObject



48
49
50
# File 'lib/libxslt/deprecated.rb', line 48

def parse
  self
end

Raises:

  • (ArgumentError)


61
62
63
# File 'lib/libxslt/deprecated.rb', line 61

def print(filename)
  raise(ArgumentError) unless @result
end

#save(filename) ⇒ Object

Raises:

  • (ArgumentError)


56
57
58
59
# File 'lib/libxslt/deprecated.rb', line 56

def save(filename)
  raise(ArgumentError) unless @result
  @result.save(filename)
end