Class: ParamsTransformer::ValueParser::BelongsTo

Inherits:
ParamsTransformer::ValueParser show all
Includes:
Relationship
Defined in:
lib/params_transformer/value_parser/belongs_to.rb

Instance Attribute Summary

Attributes included from Relationship

#transformer

Attributes inherited from ParamsTransformer::ValueParser

#input_value

Instance Method Summary collapse

Methods included from Relationship

#after_init

Methods inherited from ParamsTransformer::ValueParser

#after_init, #initialize

Constructor Details

This class inherits a constructor from ParamsTransformer::ValueParser

Instance Method Details

#parseObject



6
7
8
9
# File 'lib/params_transformer/value_parser/belongs_to.rb', line 6

def parse
  return input_value unless input_value.present?
  transformer.new(input_value).transform
end