Sha256: 8a4e7f55ec30080bb274eeeca1a15901fb2fa862c90212ca114dc21ccac7d812

Contents?: true

Size: 411 Bytes

Versions: 1

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

module Grumlin
  module Pop
    # TODO: share the code?
    class << self
      %i[first last all mixed].each do |step|
        define_method step do
          name = "@#{step}"
          return instance_variable_get(name) if instance_variable_defined?(name)

          instance_variable_set(name, TypedValue.new(type: "Pop", value: step))
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grumlin-0.11.0 lib/grumlin/pop.rb