Module: CaTissue::Annotation::Proxy_1_1

Includes:
Proxy
Defined in:
lib/catissue/annotation/proxy_1_1.rb

Overview

caTissue 1.1.x Resource annotation hook proxy mix-in.

Instance Method Summary collapse

Methods included from Proxy

#hook

Instance Method Details

#ensure_hook_existsObject

Ensures that this proxy’s hook exists in the database. This proxy’s identifier is set to the hook identifier.



30
31
32
33
# File 'lib/catissue/annotation/proxy_1_1.rb', line 30

def ensure_hook_exists
  super
  ensure_identifier_reflects_hook
end

#hook=(obj) ⇒ Object

Parameters:



23
24
25
26
# File 'lib/catissue/annotation/proxy_1_1.rb', line 23

def hook=(obj)
  super
  ensure_identifier_reflects_hook
end

#identifierInteger

The hook proxy identifier is the hook identifier. This method delegates to the hook.

Returns:

  • (Integer)

    the hook identifier



13
14
15
# File 'lib/catissue/annotation/proxy_1_1.rb', line 13

def identifier
  hook.identifier if hook
end

#identifier=(value) ⇒ Object

The proxy identifier cannot be set directly. Assignment is a no-op.

Parameters:

  • value (Integer)

    the (ignored) identifier value



20
# File 'lib/catissue/annotation/proxy_1_1.rb', line 20

def identifier=(value); end