Class: Decidim::Dev::DummySerializer

Inherits:
Object
  • Object
show all
Defined in:
app/serializers/decidim/dev/dummy_serializer.rb

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ DummySerializer

Returns a new instance of DummySerializer.



6
7
8
# File 'app/serializers/decidim/dev/dummy_serializer.rb', line 6

def initialize(id)
  @id = id
end

Instance Method Details

#runObject



10
11
12
# File 'app/serializers/decidim/dev/dummy_serializer.rb', line 10

def run
  serialize
end

#serializeObject



14
15
16
17
18
# File 'app/serializers/decidim/dev/dummy_serializer.rb', line 14

def serialize
  {
    id: @id
  }
end