mirror of
https://github.com/jimeh/twhois.git
synced 2026-02-19 02:46:41 +00:00
removed dependency on hashie
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
require 'rubygems'
|
||||
require 'net/http'
|
||||
require 'json'
|
||||
require 'hashie'
|
||||
|
||||
require 'twhois/user'
|
||||
require 'twhois/version'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,7 +20,6 @@ Gem::Specification.new do |s|
|
||||
s.require_paths = ["lib"]
|
||||
|
||||
s.add_runtime_dependency 'json_pure', '>= 1.0.0'
|
||||
s.add_runtime_dependency 'hashie', '>= 1.0.0'
|
||||
|
||||
s.add_development_dependency 'rspec', '>= 2.5.0'
|
||||
s.add_development_dependency 'yard', '>= 0.6.4'
|
||||
|
||||
Reference in New Issue
Block a user