Module: Lieutenant::Message::ClassMethods
- Defined in:
- lib/lieutenant/message.rb
Overview
Define common class methods to commands
Instance Method Summary collapse
Instance Method Details
#with(params) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/lieutenant/message.rb', line 15 def with(params) new.tap do |command| params.each_pair do |key, value| begin command.send("#{key}=", value) rescue NoMethodError # rubocop:disable Lint/HandleExceptions # DO NOTHING end end end end |