Class: TestEvents::Target

Inherits:
Object show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_eventbuilder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTarget

Returns a new instance of Target.



24
25
26
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_eventbuilder.rb', line 24

def initialize
  @events = []
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



22
23
24
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_eventbuilder.rb', line 22

def events
  @events
end

Instance Method Details

#end_tag(tag) ⇒ Object



32
33
34
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_eventbuilder.rb', line 32

def end_tag(tag)
  @events << [:end_tag, tag]
end

#start_tag(tag, attrs) ⇒ Object



28
29
30
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_eventbuilder.rb', line 28

def start_tag(tag, attrs)
  @events << [:start_tag, tag, attrs]
end

#text(string) ⇒ Object



36
37
38
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_eventbuilder.rb', line 36

def text(string)
  @events << [:text, string]
end