Class: GitHub::SQL::Rows

Inherits:
Object
  • Object
show all
Defined in:
lib/github/sql.rb

Overview

Internal: a list of arrays of values for insertion into SQL.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values) ⇒ Rows

Returns a new instance of Rows.



54
55
56
57
58
59
# File 'lib/github/sql.rb', line 54

def initialize(values)
  unless values.all? { |v| v.is_a? Array }
    raise ArgumentError, "cannot instantiate SQL rows with anything but arrays"
  end
  @values = values.dup.freeze
end

Instance Attribute Details

#valuesObject (readonly)

Public: the Array of row values



52
53
54
# File 'lib/github/sql.rb', line 52

def values
  @values
end

Instance Method Details

#inspectObject



61
62
63
# File 'lib/github/sql.rb', line 61

def inspect
  "<#{self.class.name} #{values.inspect}>"
end