Class: OldBill::V2::Crimes::Location

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

Instance Method Summary collapse

Instance Method Details

#[]=(property, value) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/oldbill/v2/crimes/location.rb', line 22

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

#street_parsed(value) ⇒ Object

id Unique identifier for the street name Name of the location. This is only an approximation of where the crime happened



15
16
17
18
19
# File 'lib/oldbill/v2/crimes/location.rb', line 15

def street_parsed(value)
  unless value.nil?
    Hashie::Mash.new(value)
  end
end