Acting

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

Installation

Add this line to your application’s Gemfile:

gem 'acting'

And then execute:

$ bundle

Or install it yourself as:

$ gem install acting

Usage

It is as simple as this:

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

module Negativist def speak; ‘NO’; end end

Acting.new(user1 => Positivist, user2 => Negativist).play do
  model1.speak # => 'YES'
  model2.speak # => 'NO'
end

model1.speak # => NoMethodError

Contributing

  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