Class: Pinspec::SkippedStatement

Inherits:
Data
  • Object
show all
Defined in:
lib/pinspec/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



452
453
454
# File 'lib/pinspec/types.rb', line 452

def column
  @column
end

#fileObject (readonly)

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



452
453
454
# File 'lib/pinspec/types.rb', line 452

def file
  @file
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



452
453
454
# File 'lib/pinspec/types.rb', line 452

def kind
  @kind
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



452
453
454
# File 'lib/pinspec/types.rb', line 452

def line
  @line
end

#referencesObject (readonly)

Returns the value of attribute references

Returns:

  • (Object)

    the current value of references



452
453
454
# File 'lib/pinspec/types.rb', line 452

def references
  @references
end

#relevantObject (readonly)

Returns the value of attribute relevant

Returns:

  • (Object)

    the current value of relevant



452
453
454
# File 'lib/pinspec/types.rb', line 452

def relevant
  @relevant
end

#tableObject (readonly)

Returns the value of attribute table

Returns:

  • (Object)

    the current value of table



452
453
454
# File 'lib/pinspec/types.rb', line 452

def table
  @table
end

Instance Method Details

#relevant?Boolean

Returns:

  • (Boolean)


453
454
455
# File 'lib/pinspec/types.rb', line 453

def relevant?
  relevant == true
end

#tables_touchedObject



457
458
459
# File 'lib/pinspec/types.rb', line 457

def tables_touched
  ([table] + Array(references)).compact.uniq
end

#to_sObject



461
462
463
464
465
# File 'lib/pinspec/types.rb', line 461

def to_s
  subject = column ? "#{table}.#{column}" : table
  via = Array(references).empty? ? "" : " on #{Array(references).join(', ')}"
  "#{kind}#{subject ? " (#{subject})" : ""}#{via} at #{file}:#{line}"
end