Class: Lutaml::Model::ImportTransformer

Inherits:
Transformer show all
Defined in:
lib/lutaml/model/services/transformer.rb

Instance Attribute Summary

Attributes inherited from Transformer

#attribute, #format, #rule

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Transformer

#apply_class_transformer, #call, #export_direction?, #get_transform, #initialize

Constructor Details

This class inherits a constructor from Lutaml::Model::Transformer

Class Method Details

.call(value, rule, attribute, format: nil) ⇒ Object



90
91
92
# File 'lib/lutaml/model/services/transformer.rb', line 90

def call(value, rule, attribute, format: nil)
  apply_static(value, [rule, attribute], :import, format)
end

Instance Method Details

#ordered_sourcesObject



95
96
97
# File 'lib/lutaml/model/services/transformer.rb', line 95

def ordered_sources
  [rule, attribute]
end

#transformation_methodsObject



99
100
101
# File 'lib/lutaml/model/services/transformer.rb', line 99

def transformation_methods
  ordered_sources.filter_map { |obj| get_transform(obj, :import) }
end