Sha256: 1ba85ca7a279ba0107fdf927f56ff330038ec7c8564b29da32280f1ae814063e
Contents?: true
Size: 537 Bytes
Versions: 10
Compression:
Stored size: 537 Bytes
Contents
module CanTango class Engine include CanTango::Helpers::Debug attr_reader :ability, :options delegate :session, :user, :subject, :candidate, :cached?, :to => :ability def initialize ability, options = {} @ability, @options = [ability, options] end def execute! raise NotImplementedError end def engine_name raise NotImplementedError end def valid_mode? mode modes.include? mode.to_sym end def modes @modes ||= options[:modes] || [] end end end
Version data entries
10 entries across 10 versions & 1 rubygems