Class: Mobility::Backends::Sequel::PgHash
- Inherits:
-
Object
- Object
- Mobility::Backends::Sequel::PgHash
- Includes:
- HashValued, Mobility::Backends::Sequel, StringifyLocale
- Defined in:
- lib/mobility/backends/sequel/pg_hash.rb
Overview
Internal class used by Sequel backends backed by a Postgres data type (hstore, jsonb).
Instance Method Summary collapse
-
#each_locale {|Locale| ... } ⇒ Object
Yields locales available for this attribute.
- #translations ⇒ Object
Methods included from HashValued
Methods included from Mobility::Backends::Sequel
included, #setup_query_methods
Instance Method Details
#each_locale {|Locale| ... } ⇒ Object
Yields locales available for this attribute.
21 22 23 |
# File 'lib/mobility/backends/sequel/pg_hash.rb', line 21 def each_locale super { |l| yield l.to_sym } end |
#translations ⇒ Object
25 26 27 |
# File 'lib/mobility/backends/sequel/pg_hash.rb', line 25 def translations model[attribute.to_sym] end |