Sha256: eb72ff9af971ff1dc83334eea190f164b2d853a09973e19d69379ee310e853e5

Contents?: true

Size: 599 Bytes

Versions: 2

Compression:

Stored size: 599 Bytes

Contents

module Terraspace::Terraform::RemoteState
  class NullObject
    def to_a
      []
    end

    def to_ary
      []
    end

    def to_s
      "(unresolved)" # always returned as part of first unresolved processing pass
    end
    alias_method :to_str, :to_s # ERB requires to_str

    def to_f
      0.0
    end

    def to_i
      0
    end

    def nil?
      true
    end

    def inspect
      format("#<%s:0x%x>", self.class, object_id)
    end

    def method_missing(*_args, &_block)
      self
    end

    def respond_to?(_message, _include_private = false)
      true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
terraspace-0.3.6 lib/terraspace/terraform/remote_state/null_object.rb
terraspace-0.3.5 lib/terraspace/terraform/remote_state/null_object.rb