Sha256: d0ab9850ae67b5621d406380d1a02e804cf7a5d2d9d60f9062fb13a58d611acf

Contents?: true

Size: 404 Bytes

Versions: 6

Compression:

Stored size: 404 Bytes

Contents

module Sunspot
  class Installer
    module TaskHelper
      def say(message)
        if @verbose
          STDOUT.puts(message)
        end
      end

      def add_element(node, name, attributes = {})
        new_node = Nokogiri::XML::Node.new(name, @document)
        attributes.each_pair { |name, value| new_node[name] = value }
        node << new_node 
        new_node
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sunspot-1.0.5 lib/sunspot/installer/task_helper.rb
sunspot-1.0.4 lib/sunspot/installer/task_helper.rb
sunspot-1.0.3 lib/sunspot/installer/task_helper.rb
sunspot-1.0.2 lib/sunspot/installer/task_helper.rb
sunspot-1.0.1 lib/sunspot/installer/task_helper.rb
sunspot-1.0.0 lib/sunspot/installer/task_helper.rb