Class: G5Updatable::LocationSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/g5_updatable/location_serializer.rb

Instance Method Summary collapse

Instance Method Details

#filter(keys) ⇒ Object



4
5
6
7
8
9
10
11
# File 'app/serializers/g5_updatable/location_serializer.rb', line 4

def filter(keys)
  object.properties.each do |name, value|
    keys.push(name.to_sym)
    define_singleton_method(name.to_sym) { value }
  end

  keys
end