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.



51
52
53
# File 'lib/inspec/run_data/control.rb', line 51

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



47
48
49
# File 'lib/inspec/run_data/control.rb', line 47

def line
  @line
end

#refObject

Returns the value of attribute ref

Returns:

  • (Object)

    the current value of ref



47
48
49
# File 'lib/inspec/run_data/control.rb', line 47

def ref
  @ref
end