lib/response.rb in textmagic-0.3.2 vs lib/response.rb in textmagic-0.3.3
- old
+ new
@@ -59,8 +59,16 @@
metaclass = class << response; self; end
metaclass.send :attr_accessor, :unread
response.unread = hash['unread']
response
end
+
+ def self.check_number(hash, single)
+ response = {}
+ hash.each do |phone, check_hash|
+ response[phone] = OpenStruct.new(check_hash)
+ end
+ single ? response.values.first : response
+ end
end
end
end