Sha256: 157dc80cb9ae2dcf7ffc2f2c5a85cf35828d291f6f9bcd782e956dbd86cb9723

Contents?: true

Size: 548 Bytes

Versions: 26

Compression:

Stored size: 548 Bytes

Contents

# frozen_string_literal: true

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

    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

26 entries across 26 versions & 1 rubygems

Version Path
facter-4.1.1 lib/facter/models/resolved_fact.rb
facter-4.1.0 lib/facter/models/resolved_fact.rb
facter-4.0.52 lib/facter/models/resolved_fact.rb
facter-4.0.51 lib/facter/models/resolved_fact.rb
facter-4.0.50 lib/facter/models/resolved_fact.rb
facter-4.0.49 lib/facter/models/resolved_fact.rb
facter-4.0.48 lib/facter/models/resolved_fact.rb
facter-4.0.47 lib/facter/models/resolved_fact.rb
facter-4.0.46 lib/facter/models/resolved_fact.rb
facter-4.0.44 lib/facter/models/resolved_fact.rb
facter-4.0.43 lib/facter/models/resolved_fact.rb
facter-4.0.42 lib/facter/models/resolved_fact.rb
facter-4.0.41 lib/facter/models/resolved_fact.rb
facter-4.0.40 lib/facter/models/resolved_fact.rb
facter-4.0.39 lib/facter/models/resolved_fact.rb
facter-4.0.38 lib/facter/models/resolved_fact.rb
facter-4.0.37 lib/facter/models/resolved_fact.rb
facter-4.0.36 lib/facter/models/resolved_fact.rb
facter-4.0.35 lib/facter/models/resolved_fact.rb
facter-4.0.34 lib/facter/models/resolved_fact.rb