Class: Boilerpipe::SAX::TagActions::Chained

Inherits:
Object
  • Object
show all
Defined in:
lib/boilerpipe/sax/tag_actions/chained.rb

Instance Method Summary collapse

Constructor Details

#initialize(t1, t2) ⇒ Chained

Returns a new instance of Chained.



3
4
5
6
# File 'lib/boilerpipe/sax/tag_actions/chained.rb', line 3

def initialize(t1, t2)
  @t1 = t1
  @t2 = t2
end

Instance Method Details

#changes_tag_level?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/boilerpipe/sax/tag_actions/chained.rb', line 16

def changes_tag_level?
  @t1.changes_tag_level? || @t2.changes_tag_level?
end

#end_tag(handler, name) ⇒ Object



12
13
14
# File 'lib/boilerpipe/sax/tag_actions/chained.rb', line 12

def end_tag(handler, name)
  @t1.end_tag(handler, name) | @t2.end_tag(handler, name)
end

#start(handler, name, attrs) ⇒ Object



8
9
10
# File 'lib/boilerpipe/sax/tag_actions/chained.rb', line 8

def start(handler, name, attrs)
  @t1.start(handler, name, attrs) | @t2.start(handler, name, attrs)
end