Sha256: 171d9aad06454f429b5c51abb68e60d056f6026340e05f51a2c25bc20f2c7849

Contents?: true

Size: 544 Bytes

Versions: 10

Compression:

Stored size: 544 Bytes

Contents

# frozen_string_literal: true

module CycloneLariat
  module Repo
    module ActiveRecord
      class Versions
        attr_reader :dataset

        def initialize(dataset)
          @dataset = dataset
        end

        def add(version)
          dataset.create(version: version)
          true
        end

        def remove(version)
          dataset.where(version: version).delete_all.positive?
        end

        def all
          dataset.pluck(:version).map { |version| { version: version } }
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cyclone_lariat-1.0.0 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc9 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc8 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc7 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc6 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc5 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc4 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc3 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc2 lib/cyclone_lariat/repo/active_record/versions.rb
cyclone_lariat-1.0.0.rc1 lib/cyclone_lariat/repo/active_record/versions.rb