Class: OldBill::V2::CrimeByMonth
- Inherits:
-
Hashie::Trash
- Object
- Hashie::Trash
- OldBill::V2::CrimeByMonth
- Defined in:
- lib/oldbill/v2/crime_by_month.rb
Class Method Summary collapse
Class Method Details
.property(property_name, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/oldbill/v2/crime_by_month.rb', line 5 def self.property(property_name, = {}) if [:from] && [:from] =~ /-/ translations << [:from].to_sym define_method "#{[:from]}=" do |val| self[:"#{property_name}"] = val end .delete(:from) super(property_name, ) else super end end |