Class: SnipSnip::Reporter::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/snip_snip/reporter.rb

Overview

Represents a result that has unused columns.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_nameObject

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



7
8
9
# File 'lib/snip_snip/reporter.rb', line 7

def class_name
  @class_name
end

#primary_keyObject

Returns the value of attribute primary_key

Returns:

  • (Object)

    the current value of primary_key



7
8
9
# File 'lib/snip_snip/reporter.rb', line 7

def primary_key
  @primary_key
end

#unusedObject

Returns the value of attribute unused

Returns:

  • (Object)

    the current value of unused



7
8
9
# File 'lib/snip_snip/reporter.rb', line 7

def unused
  @unused
end

Instance Method Details

#reportObject

A string representing the unused columns for the given record.



10
11
12
# File 'lib/snip_snip/reporter.rb', line 10

def report
  @report ||= "#{class_name} #{primary_key}: #{unused.sort.join(', ')}"
end