Class: ROM::Transformer
- Inherits:
-
Object
- Object
- ROM::Transformer
- Extended by:
- Plugins::ClassMethods
- Defined in:
- lib/rom/transformer.rb
Overview
Transformer is a data mapper which uses Dry::Transformer
's DSL to define transformations.
Class Method Summary collapse
-
.build ⇒ Transformer
Build a mapper instance.
-
.map(&block) ⇒ self
Define transformation pipeline.
-
.plugins ⇒ Object
extended
from Plugins::ClassMethods
Return all available plugins for the component type.
-
.use(name, **options) ⇒ Object
extended
from Plugins::ClassMethods
Include a registered plugin in this relation class.
Class Method Details
.build ⇒ Transformer
Build a mapper instance
40 41 42 |
# File 'lib/rom/transformer.rb', line 40 def self.build new end |
.map(&block) ⇒ self
Define transformation pipeline
29 30 31 32 33 |
# File 'lib/rom/transformer.rb', line 29 def self.map(&block) define! do map_array(&block) end end |
.plugins ⇒ Object Originally defined in module Plugins::ClassMethods
Return all available plugins for the component type
.use(name, **options) ⇒ Object Originally defined in module Plugins::ClassMethods
Include a registered plugin in this relation class