Sha256: a3e946ec775a947404b4b39ca611f220326bf1456951c65478606c0380cf9d0c

Contents?: true

Size: 541 Bytes

Versions: 8

Compression:

Stored size: 541 Bytes

Contents

# frozen_string_literal: true

module Facter
  class ResolvedFact
    attr_reader :name, :type
    attr_accessor :user_query, :filter_tokens, :value

    def initialize(name, value = '', type = :core, user_query = nil, filter_tokens = [])
      @name = name
      @value = Utils.deep_stringify_keys(value)
      @type = type
      @user_query = user_query
      @filter_tokens = filter_tokens
    end

    def legacy?
      type == :legacy
    end

    def core?
      type == :core
    end

    def to_s
      @value.to_s
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
facter-4.0.26 lib/models/resolved_fact.rb
facter-4.0.25 lib/models/resolved_fact.rb
facter-4.0.24 lib/models/resolved_fact.rb
facter-4.0.23 lib/models/resolved_fact.rb
facter-4.0.22 lib/models/resolved_fact.rb
facter-4.0.21 lib/models/resolved_fact.rb
facter-4.0.20 lib/models/resolved_fact.rb
facter-4.0.19 lib/models/resolved_fact.rb