Class: DatabaseHelper::SQLColumn

Inherits:
Object
  • Object
show all
Defined in:
lib/inspec/utils/database_helpers.rb

Instance Method Summary collapse

Constructor Details

#initialize(row, name) ⇒ SQLColumn

Returns a new instance of SQLColumn.



3
4
5
6
# File 'lib/inspec/utils/database_helpers.rb', line 3

def initialize(row, name)
  @row = row
  @name = name
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/inspec/utils/database_helpers.rb', line 12

def to_s
  "SQL Column"
end

#valueObject



8
9
10
# File 'lib/inspec/utils/database_helpers.rb', line 8

def value
  @row.nil? ? "" : @row[@name.downcase]
end