Method: Commutator::Util::Fluent::ClassMethods#fluent_wrapper
- Defined in:
- lib/commutator/util/fluent.rb
#fluent_wrapper(*attr_names) ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/commutator/util/fluent.rb', line 46 def fluent_wrapper(*attr_names) attr_names.each do |attr_name| define_method "with_#{attr_name}" do |&block| block.call(instance_variable_get("@#{attr_name}")) self end end end |