Class: XML::XXPath::ThisNodeStep

Inherits:
Step
  • Object
show all
Defined in:
lib/xml/xxpath/steps.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Step

#creator, inherited, #initialize, #reader

Constructor Details

This class inherits a constructor from XML::XXPath::Step

Class Method Details

.compile(axis, string) ⇒ Object



260
261
262
263
# File 'lib/xml/xxpath/steps.rb', line 260

def self.compile axis, string
  '.'==string or return nil
  self.new axis
end

Instance Method Details

#create_on(node, create_new) ⇒ Object



269
270
271
272
273
274
# File 'lib/xml/xxpath/steps.rb', line 269

def create_on(node,create_new)
  if create_new
    raise XXPathError, "XPath: .: create_new and attribute already exists"
  end
  node
end

#matches?(node) ⇒ Boolean

Returns:

  • (Boolean)


265
266
267
# File 'lib/xml/xxpath/steps.rb', line 265

def matches? node
  true
end