Class: GitHub::SQL::Rows
- Inherits:
-
Object
- Object
- GitHub::SQL::Rows
- Defined in:
- lib/github/sql/rows.rb
Overview
Internal: a list of arrays of values for insertion into SQL.
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Public: the Array of row values.
Instance Method Summary collapse
-
#initialize(values) ⇒ Rows
constructor
A new instance of Rows.
- #inspect ⇒ Object
Constructor Details
#initialize(values) ⇒ Rows
Returns a new instance of Rows.
8 9 10 11 12 13 |
# File 'lib/github/sql/rows.rb', line 8 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
#values ⇒ Object (readonly)
Public: the Array of row values
6 7 8 |
# File 'lib/github/sql/rows.rb', line 6 def values @values end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/github/sql/rows.rb', line 15 def inspect "<#{self.class.name} #{values.inspect}>" end |