Class: Nokogiri::XML::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/genit/extensions/nokogiri_extension.rb

Overview

I think it’s a bad idea to extend the Nokogiri library cause it makes a too big dependency on Genit. It will be much better to do a little wrapper over Nokogiri::XML::Node.

Instance Method Summary collapse

Instance Method Details

#genit_class?Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
# File 'lib/genit/extensions/nokogiri_extension.rb', line 11

def genit_class?
  if self['class']
    true
  else
    false
  end
end

#genit_here?Boolean

Returns:

  • (Boolean)


19
20
21
22
23
24
25
# File 'lib/genit/extensions/nokogiri_extension.rb', line 19

def genit_here?
  if self['here']
    true
  else
    false
  end
end

#genit_what?Boolean

Returns:

  • (Boolean)


27
28
29
30
31
32
33
# File 'lib/genit/extensions/nokogiri_extension.rb', line 27

def genit_what?
  if self['what']
    true
  else
    false
  end
end