Sha256: 1533095867da2678346e458bffc4c802a99f4a8dc3014d4fb3014fd9197be626

Contents?: true

Size: 444 Bytes

Versions: 5

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

module Factrey
  class Ref
    # An intermediate object for creating {Ref}s. See {ShorthandMethods#ref}.
    class Builder < BasicObject
      # @!visibility private
      def respond_to_missing?(_name, _) = true

      # @example
      #   ref = Factrey::Ref::Builder.new
      #   ref.hoge # same as Factrey::Ref.new(:hoge)
      # @return [Ref]
      def method_missing(name) = Ref.new(name)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
factrey-0.5.0 lib/factrey/ref/builder.rb
factrey-0.4.0 lib/factrey/ref/builder.rb
factrey-0.3.0 lib/factrey/ref/builder.rb
factrey-0.2.0 lib/factrey/ref/builder.rb
factrey-0.1.0 lib/factrey/ref/builder.rb