module WrapperBased
Constants
- RoleValueMissing
- TALENTLESS
- VERSION
Public Instance Methods
with!(**role_players)
click to toggle source
# 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
Private Instance Methods
_components()
click to toggle source
# File lib/wrapper_based.rb, line 27 def _components @_components ||= {} end
cast_as(role, actor, &recast)
click to toggle source
# File lib/wrapper_based.rb, line 23 def cast_as(role, actor, &recast) _components[role].as_role_played_by(actor, &recast) end