# I don't think you're supposed to require gems here, # they should go in the Gemspec as dependencies require 'nokogiri' require 'open-uri' require 'json' Gem.find_files("hentry_consumer/**/*.rb").each { |path| require path } module HentryConsumer module ClassMethods def parse(html) HFeed.new(html) end end extend ClassMethods def self.included(other) other.extend(ClassMethods) end end class String def underscore self.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end end