Class: Oinky::OpenSelector
- Inherits:
-
Object
- Object
- Oinky::OpenSelector
- Defined in:
- lib/oinky.rb
Overview
This is a column selector that’s not bound to a particular table
Instance Attribute Summary collapse
-
#cols ⇒ Object
Returns the value of attribute cols.
Instance Method Summary collapse
- #from(target) ⇒ Object
-
#initialize(cols) ⇒ OpenSelector
constructor
A new instance of OpenSelector.
Constructor Details
#initialize(cols) ⇒ OpenSelector
Returns a new instance of OpenSelector.
729 730 731 |
# File 'lib/oinky.rb', line 729 def initialize(cols) @cols = cols end |
Instance Attribute Details
#cols ⇒ Object
Returns the value of attribute cols.
728 729 730 |
# File 'lib/oinky.rb', line 728 def cols @cols end |
Instance Method Details
#from(target) ⇒ Object
732 733 734 |
# File 'lib/oinky.rb', line 732 def from(target) target.each(@cols) end |