Module: WrapperBased
- Defined in:
- lib/wrapper_based.rb,
lib/wrapper_based/casting.rb,
lib/wrapper_based/context.rb,
lib/wrapper_based/version.rb,
lib/wrapper_based/casting/pool.rb,
lib/wrapper_based/casting/type.rb,
lib/wrapper_based/role_unknown.rb,
lib/wrapper_based/type_casting.rb,
lib/wrapper_based/casting/director.rb
Defined Under Namespace
Modules: TypeCasting Classes: Casting, Context, RoleUnknown
Constant Summary collapse
- RoleValueMissing =
Class.new(StandardError)
- VERSION =
"2.0.0"
- TALENTLESS =
-> actor { actor }
Instance Method Summary collapse
Instance Method Details
#with!(**role_players) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/wrapper_based.rb', line 12 def with!(**role_players) role_players.each { |role, player| send :"with_#{role}!", player } self rescue NoMethodError => error raise RoleUnknown.or(error) end |