Class: OpenDNS::DNSDB::Response::Raw

Inherits:
Hashie::Mash
  • Object
show all
Includes:
Common
Defined in:
lib/opendns-dnsdb/dnsdb/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(source_hash = nil, default = nil, &blk) ⇒ Raw

Returns a new instance of Raw.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/opendns-dnsdb/dnsdb/response.rb', line 11

def initialize(source_hash = nil, default = nil, &blk)
  if source_hash
    if source_hash[:first_seen]
      source_hash[:first_seen] = Date.parse(source_hash[:first_seen])
    end
    if source_hash[:last_seen]
      source_hash[:last_seen] = Date.parse(source_hash[:last_seen])
    end
  end
  super(source_hash, default, &blk)
end