lib/crunchbase/relationship.rb in crunchbase_v2-0.0.4 vs lib/crunchbase/relationship.rb in crunchbase_v2-0.0.5
- old
+ new
@@ -9,10 +9,10 @@
def initialize(hash)
@type_name = hash["type"]
@announced_on = hash["announced_on"] && DateTime.parse(hash["announced_on"])
@name = hash["name"]
@path = hash["path"]
- @permalink = hash["path"].split('/').last
+ @permalink = hash["path"] && hash["path"].split('/').last
@created_at = hash['created_at'] && Time.at(hash['created_at']).utc
@updated_at = hash['updated_at'] && Time.at(hash['updated_at']).utc
end
end