Acting lets your objects play a role. But just for a specific duration. One of the main-concepts for a clean DCI implementation.


Add this line to your application’s Gemfile:

gem 'acting'

And then execute:

$ bundle

Or install it yourself as:

$ gem install acting


It is as simple as this:

“by module Positivist def speak; ‘YES’; end end

module Negativist def speak; ‘NO’; end end => Positivist, user2 => Negativist).play do
  model1.speak # => 'YES'
  model2.speak # => 'NO'

model1.speak # => NoMethodError


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request