removed dependency on hashie

This commit is contained in:
2011-03-01 23:45:06 +00:00
parent aba833af8d
commit 0a34194965
3 changed files with 9 additions and 3 deletions

View File

@@ -3,7 +3,6 @@
require 'rubygems'
require 'net/http'
require 'json'
require 'hashie'
require 'twhois/user'
require 'twhois/version'

View File

@@ -1,7 +1,15 @@
# encoding: utf-8
module Twhois
class User < ::Hashie::Mash
# Kinda acts like the Hashie gem
class User
def initialize(hash)
hash.keys.each do |key|
self.class.send(:attr_accessor, key.to_sym)
self.send("#{key}=", hash[key])
end
end
end
end