Sha256: 19dad21bd233cb621050922f24027c74e4225dc7063b46f8e4433f48aeef35f7

Contents?: true

Size: 599 Bytes

Versions: 5

Compression:

Stored size: 599 Bytes

Contents

require 'rexml/document'

module Rake
  module Funnel
    module Extensions
      module REXML
        module Functions
          def lower_case(string)
            string.first.to_s.downcase
          end

          def matches(string, test)
            File.fnmatch?(test, string.first.to_s, File::FNM_CASEFOLD)
          end
        end
      end
    end
  end
end

module REXML
  module Functions
    extend Rake::Funnel::Extensions::REXML::Functions

    Rake::Funnel::Extensions::REXML::Functions.public_instance_methods.each do |method|
      singleton_method_added(method)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rake-funnel-0.22.2 lib/rake/funnel/extensions/rexml.rb
rake-funnel-0.22.1 lib/rake/funnel/extensions/rexml.rb
rake-funnel-0.22.0 lib/rake/funnel/extensions/rexml.rb
rake-funnel-0.21.2 lib/rake/funnel/extensions/rexml.rb
rake-funnel-0.21.1 lib/rake/funnel/extensions/rexml.rb