Class: Lutaml::Model::ExportTransformer

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, #get_transform, #initialize

Constructor Details

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

Class Method Details

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



106
107
108
# File 'lib/lutaml/model/services/transformer.rb', line 106

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

Instance Method Details

#export_direction?Boolean

Returns:

  • (Boolean)


119
120
121
# File 'lib/lutaml/model/services/transformer.rb', line 119

def export_direction?
  true
end

#ordered_sourcesObject



111
112
113
# File 'lib/lutaml/model/services/transformer.rb', line 111

def ordered_sources
  [attribute, rule]
end

#transformation_methodsObject



115
116
117
# File 'lib/lutaml/model/services/transformer.rb', line 115

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