Module: ParamsTransformer::ValueParser::Relationship

Included in:
BelongsTo, HasMany, HasOne
Defined in:
lib/params_transformer/value_parser/relationship.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#transformerObject (readonly)

Returns the value of attribute transformer.



4
5
6
# File 'lib/params_transformer/value_parser/relationship.rb', line 4

def transformer
  @transformer
end

Instance Method Details

#after_init(args = {}) ⇒ Object



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

def after_init(args = {})
  @transformer = args[:transformer]
  raise "An associated transformer class is required for #{self.class.name} input" unless @transformer.present?
end