Class: Lutaml::Model::ExportTransformer

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

Instance Attribute Summary

Attributes inherited from Transformer

#attribute, #context, #format, #rule

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Transformer

#apply_class_transformer, #call, #get_transform, #initialize, #invoke_transform

Constructor Details

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

Class Method Details

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



125
126
127
# File 'lib/lutaml/model/services/transformer.rb', line 125

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

Instance Method Details

#export_direction?Boolean

Returns:

  • (Boolean)


138
139
140
# File 'lib/lutaml/model/services/transformer.rb', line 138

def export_direction?
  true
end

#ordered_sourcesObject



130
131
132
# File 'lib/lutaml/model/services/transformer.rb', line 130

def ordered_sources
  [attribute, rule]
end

#transformation_methodsObject



134
135
136
# File 'lib/lutaml/model/services/transformer.rb', line 134

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