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.



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

def initialize(stylesheet)
  @stylesheet = stylesheet
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



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

def doc
  @doc
end

#filenameObject

Returns the value of attribute filename.



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

def filename
  @filename
end

Instance Method Details

#applyObject



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

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

#parseObject



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

def parse
  self
end

Raises:

  • (ArgumentError)


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

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

#save(filename) ⇒ Object

Raises:

  • (ArgumentError)


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

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