Class: OpenDNS::DNSDB::Response::Raw
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- OpenDNS::DNSDB::Response::Raw
- Includes:
- Common
- Defined in:
- lib/opendns-dnsdb/dnsdb/response.rb
Instance Method Summary collapse
-
#initialize(source_hash = nil, default = nil, &blk) ⇒ Raw
constructor
A new instance of Raw.
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 |