class Authorization::DevelopmentSupport::ChangeSupporter::AbstractAction
Public Class Methods
readable_info(info)
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 274 def self.readable_info (info) if info.respond_to?(:to_sym) info.to_sym.inspect else info.inspect end end
specific_actions(candidate)
click to toggle source
returns a list of instances of the action that may be applied
# File lib/declarative_authorization/development_support/change_supporter.rb, line 236 def self.specific_actions (candidate) raise NotImplementedError, "Not yet?" end
Public Instance Methods
apply(candidate)
click to toggle source
applies the specific action on the given candidate
# File lib/declarative_authorization/development_support/change_supporter.rb, line 241 def apply (candidate) raise NotImplementedError, "Not yet?" end
eql?(other)
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 245 def eql? (other) other.class == self.class and hash == other.hash end
hash()
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 249 def hash @hash ||= to_a.hash end
inspect()
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 257 def inspect "#{self.class.name.demodulize} #{hash} #{to_a.hash} (#{to_a[1..-1].collect {|info| self.class.readable_info(info)} * ','})" end
resembles?(spec)
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 265 def resembles? (spec) min_length = [spec.length, to_a.length].min to_a[0,min_length] == spec[0,min_length] end
resembles_any?(specs)
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 270 def resembles_any? (specs) specs.any? {|spec| resembles?(spec) } end
reverse?(other)
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 253 def reverse? (other) false end
to_a()
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 261 def to_a [:abstract] end
weight()
click to toggle source
# File lib/declarative_authorization/development_support/change_supporter.rb, line 231 def weight 1 end