Sha256: ea31b5a32eccd99509f585a3f733d07c65adc4feb1426c18798292ffb07b54e3

Contents?: true

Size: 395 Bytes

Versions: 1

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

module Grumlin
  module T
    # TODO: share the code?
    class << self
      %i[id label].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: "T", 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/t.rb