Class: OldBill::V2::Crimes::StreetLevel

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/oldbill/v2/crimes/street_level.rb

Instance Method Summary collapse

Instance Method Details

#[]=(property, value) ⇒ Object

yak!!!!! refactor me please



20
21
22
23
24
25
26
27
# File 'lib/oldbill/v2/crimes/street_level.rb', line 20

def []=(property, value)
  case property 
    when "location"
    super(property.to_s, location_parsed(value))
  else
    super
  end
end

#location_parsed(value) ⇒ Object



13
14
15
16
17
# File 'lib/oldbill/v2/crimes/street_level.rb', line 13

def location_parsed(value)
  unless value.nil?
    Location.new(value)
  end
end