Module: Metka
- Defined in:
- lib/metka.rb,
lib/metka/model.rb,
lib/metka/version.rb,
lib/metka/tag_list.rb,
lib/metka/tags_query.rb,
lib/metka/query_builder.rb,
lib/metka/generic_parser.rb,
lib/generators/metka/strategies/index/index_generator.rb,
lib/generators/metka/strategies/table/table_generator.rb
Defined Under Namespace
Modules: Generators Classes: Error, GenericParser, Model, QueryBuilder, TagList, TagsQuery
Constant Summary collapse
- AND =
How multiple tag columns combine in a tagged_with query. These are the public vocabulary, so they are plain symbols — Arel is an implementation detail of the query builder and does not belong in a caller's code.
:and- OR =
:or- VERSION =
"3.0.0"
Class Method Summary collapse
-
.config ⇒ Object
These two settings came from dry-configurable, which reached them through Metka.config.
- .configure {|_self| ... } ⇒ Object
- .Model(column: nil, columns: nil, **options) ⇒ Object
Class Method Details
.config ⇒ Object
These two settings came from dry-configurable, which reached them through Metka.config. Nothing else in the gem needed that gem, so it is gone and the entry points it provided forward to the module itself.
27 28 29 |
# File 'lib/metka.rb', line 27 def self.config self end |
.configure {|_self| ... } ⇒ Object
31 32 33 |
# File 'lib/metka.rb', line 31 def self.configure yield self end |
.Model(column: nil, columns: nil, **options) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/metka/model.rb', line 6 def self.Model(column: nil, columns: nil, **) columns = [ column, *columns ].uniq.compact raise ArgumentError, "Columns not specified" unless columns.present? Metka::Model.new(columns: columns, **) end |