class Jot::Ruby::ImplBase

Constants

DEFAULT_METHODS
DEFAULT_OPERATIONS
RAW_METHODS

Attributes

registry_key[R]

Public Class Methods

inherited(base) click to toggle source
Calls superclass method
# File lib/jot/ruby/impl_base.rb, line 16
def inherited(base)
  super
  base.prepend Prepender
  base.registry_key = SecureRandom.hex
  ::Jot::Ruby.impl_registry[base.registry_key] = base
end
operation_class() click to toggle source
# File lib/jot/ruby/impl_base.rb, line 24
def self.operation_class
  @operation_class ||= begin
    klass = Class.new(Operation)
    if self.constants.include? :OperationMethods
      klass.include self::OperationMethods
    else
      raise Errors::NoImplError, "impl has no OperationMethods module"
    end
    klass.prepend Operation::OriginalOperationMethods
    klass
  end
end
registry_key=(new_name) click to toggle source
# File lib/jot/ruby/impl_base.rb, line 9
def registry_key=(new_name)
  old_name = @registry_key
  @registry_key = new_name.to_s
  ::Jot::Ruby.impl_registry[@registry_key] = self
  ::Jot::Ruby.impl_registry.delete old_name
end