Class: Messaging::Adapters::Postgres::Categories::Row
- Inherits:
-
Object
- Object
- Messaging::Adapters::Postgres::Categories::Row
- Extended by:
- Dry::Initializer
- Defined in:
- lib/messaging/adapters/postgres/categories/row.rb
Instance Method Summary collapse
Instance Method Details
#category_class ⇒ Object
12 13 14 15 16 |
# File 'lib/messaging/adapters/postgres/categories/row.rb', line 12 def category_class return CategoryWithPartitions if type == 'p' Category end |
#category_name ⇒ Object
18 19 20 21 |
# File 'lib/messaging/adapters/postgres/categories/row.rb', line 18 def category_name regexp = /FOR VALUES IN \(\'(.*)\'\)/ expression.match(regexp)[1] end |
#to_category ⇒ Object
23 24 25 |
# File 'lib/messaging/adapters/postgres/categories/row.rb', line 23 def to_category category_class.new(category_name, table_name) end |