module RubyJmeter class DSL def counter(params={}, &block) node = RubyJmeter::Counter.new(params) attach_node(node, &block) end end class Counter attr_accessor :doc include Helper def initialize(params={}) params[:name] ||= 'Counter' @doc = Nokogiri::XML(<<-EOS.strip_heredoc) true true ) EOS update params update_at_xpath params if params[:update_at_xpath] end end end