Sha256: 0c7b9e1f88469980c011519d63c9624794501fd487f6ec51c400a0c3a116f84d

Contents?: true

Size: 196 Bytes

Versions: 1

Compression:

Stored size: 196 Bytes

Contents

require 'json'

module PunkyBrewster
  class BeerList < Array
    def serialized_properties
      map(&:to_h)
    end

    def to_json
      JSON.generate(serialized_properties)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
punky_brewster-1.3.2 lib/punky_brewster/beer_list.rb