Class: GitHub::SQL::Rows
- Inherits:
-
Object
- Object
- GitHub::SQL::Rows
- Defined in:
- lib/github/sql.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.
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
#values ⇒ Object (readonly)
Public: the Array of row values
52 53 54 |
# File 'lib/github/sql.rb', line 52 def values @values end |
Instance Method Details
#inspect ⇒ Object
61 62 63 |
# File 'lib/github/sql.rb', line 61 def inspect "<#{self.class.name} #{values.inspect}>" end |