Module: Messaging::Write::Configure

Defined in:
lib/messaging/write.rb

Instance Method Summary collapse

Instance Method Details

#configure(receiver, session: nil, attr_name: nil) ⇒ Object



34
35
36
37
38
# File 'lib/messaging/write.rb', line 34

def configure(receiver, session: nil, attr_name: nil)
  attr_name ||= :write
  instance = build(session: session)
  receiver.public_send "#{attr_name}=", instance
end