Sha256: ee2e71e06db14fef0a2a0e0a1ae35556e2851a51a71d6e5d15f0b880aa1950f9

Contents?: true

Size: 433 Bytes

Versions: 11

Compression:

Stored size: 433 Bytes

Contents

# frozen_string_literal: true

module Fixtury
  class Reference

    HOLDER_VALUE = "__BUILDING_FIXTURE__"

    def self.holder(name)
      new(name, HOLDER_VALUE)
    end

    attr_reader :name, :value, :created_at

    def initialize(name, value)
      @name = name
      @value = value
      @created_at = Time.now.to_i
    end

    def holder?
      value == HOLDER_VALUE
    end

    def real?
      !holder?
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fixtury-0.3.2 lib/fixtury/reference.rb
fixtury-0.3.1 lib/fixtury/reference.rb
fixtury-0.3.0 lib/fixtury/reference.rb
fixtury-0.3.0.beta lib/fixtury/reference.rb
fixtury-0.2.1 lib/fixtury/reference.rb
fixtury-0.2.0 lib/fixtury/reference.rb
fixtury-0.1.0 lib/fixtury/reference.rb
fixtury-0.1.0.rc1 lib/fixtury/reference.rb
fixtury-0.1.0.beta2 lib/fixtury/reference.rb
fixtury-0.1.0.beta lib/fixtury/reference.rb
fixtury-0.1.0.alpha2 lib/fixtury/reference.rb