Class: Inspec::RunData::Control::SourceLocation

Inherits:
Struct
  • Object
show all
Includes:
HashLikeStruct
Defined in:
lib/inspec/run_data/control.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashLikeStruct

#key?, #keys, #non_nil?

Constructor Details

#initialize(raw_sl_data) ⇒ SourceLocation

Returns a new instance of SourceLocation.



57
58
59
# File 'lib/inspec/run_data/control.rb', line 57

def initialize(raw_sl_data)
  %i{line ref}.each { |f| self[f] = raw_sl_data[f] }
end

Instance Attribute Details

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



53
54
55
# File 'lib/inspec/run_data/control.rb', line 53

def line
  @line
end

#refObject

Returns the value of attribute ref

Returns:

  • (Object)

    the current value of ref



53
54
55
# File 'lib/inspec/run_data/control.rb', line 53

def ref
  @ref
end