Class: Facter::LoadedFact

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/models/loaded_fact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, klass, type = nil, file = nil) ⇒ LoadedFact

Returns a new instance of LoadedFact.



8
9
10
11
12
13
14
# File 'lib/facter/models/loaded_fact.rb', line 8

def initialize(name, klass, type = nil, file = nil)
  @name = name
  @klass = klass
  @type = type.nil? ? :core : type
  @file = file
  @is_env = false
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



6
7
8
# File 'lib/facter/models/loaded_fact.rb', line 6

def file
  @file
end

#is_envObject

Returns the value of attribute is_env.



6
7
8
# File 'lib/facter/models/loaded_fact.rb', line 6

def is_env
  @is_env
end

#klassObject (readonly)

Returns the value of attribute klass.



5
6
7
# File 'lib/facter/models/loaded_fact.rb', line 5

def klass
  @klass
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/facter/models/loaded_fact.rb', line 5

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/facter/models/loaded_fact.rb', line 5

def type
  @type
end