Class Authorization::DevelopmentSupport::ChangeSupporter::AbstractAction
In: lib/declarative_authorization/development_support/change_supporter.rb
Parent: Object

Methods

Public Class methods

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 274
274:         def self.readable_info (info)
275:           if info.respond_to?(:to_sym)
276:             info.to_sym.inspect
277:           else
278:             info.inspect
279:           end
280:         end

returns a list of instances of the action that may be applied

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 236
236:         def self.specific_actions (candidate)
237:           raise NotImplementedError, "Not yet?"
238:         end

Public Instance methods

applies the specific action on the given candidate

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 241
241:         def apply (candidate)
242:           raise NotImplementedError, "Not yet?"
243:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 245
245:         def eql? (other)
246:           other.class == self.class and hash == other.hash
247:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 249
249:         def hash
250:           @hash ||= to_a.hash
251:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 257
257:         def inspect
258:           "#{self.class.name.demodulize} #{hash} #{to_a.hash} (#{to_a[1..-1].collect {|info| self.class.readable_info(info)} * ','})"
259:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 265
265:         def resembles? (spec)
266:           min_length = [spec.length, to_a.length].min
267:           to_a[0,min_length] == spec[0,min_length]
268:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 270
270:         def resembles_any? (specs)
271:           specs.any? {|spec| resembles?(spec) }
272:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 253
253:         def reverse? (other)
254:           false
255:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 261
261:         def to_a
262:           [:abstract]
263:         end

[Source]

     # File lib/declarative_authorization/development_support/change_supporter.rb, line 231
231:         def weight
232:           1
233:         end

[Validate]