Class: DatabaseHelper::SQLColumn

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

Instance Method Summary collapse

Constructor Details

#initialize(row, name) ⇒ SQLColumn

Returns a new instance of SQLColumn.



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

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

Instance Method Details

#to_sObject



16
17
18
# File 'lib/utils/database_helpers.rb', line 16

def to_s
  'SQL Column'
end

#valueObject



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

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