Sha256: ab1db473a3ea98fac06e31c1884ca2527908f21d53edfa954be7ec5caf8e1cbf

Contents?: true

Size: 421 Bytes

Versions: 44

Compression:

Stored size: 421 Bytes

Contents

class Eco::Data::Locations::NodePlain
  module Serial
    attr_writer :serializer

    # @return [Proc] the serializer to be used.
    def serializer
      @serializer ||= proc do |node|
        raise "Expecting NodePlain. Given: #{node.class}" unless node.is_a?(Eco::Data::Locations::NodePlain)
        keys = Eco::Data::Locations::NodePlain::ALL_ATTRS
        node.to_h(*keys)
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
eco-helpers-3.0.21 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.20 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.19 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.18 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.17 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.16 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.15 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.14 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.13 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.12 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.11 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.10 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.9 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.8 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.7 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.6 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.5 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.4 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.3 lib/eco/data/locations/node_plain/serial.rb
eco-helpers-3.0.2 lib/eco/data/locations/node_plain/serial.rb