Class: PgArray
- Inherits:
-
Object
- Object
- PgArray
- Defined in:
- lib/pg_array/pg_array.rb
Instance Method Summary collapse
-
#initialize(pg_array_string) ⇒ PgArray
constructor
A new instance of PgArray.
- #to_a ⇒ Object
Constructor Details
#initialize(pg_array_string) ⇒ PgArray
Returns a new instance of PgArray.
3 4 5 |
# File 'lib/pg_array/pg_array.rb', line 3 def initialize(pg_array_string) @pg_array_string = pg_array_string end |
Instance Method Details
#to_a ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/pg_array/pg_array.rb', line 7 def to_a @to_a ||= begin if @pg_array_string.nil? nil else parse_array(@pg_array_string) end end end |