Class: ArcadiaContract

Inherits:
Object
  • Object
show all
Includes:
Observable, Singleton
Defined in:
ext/ae-rad/ae-rad-libs.rb

Overview

The contract define the interface beetwhen extension in particulare define method than raise event to observers client and a way to retreive state from client

Defined Under Namespace

Classes: ContractEvent, EventInfo, SObj, TObj

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.publish_action(_method) ⇒ Object



1006
1007
1008
1009
1010
# File 'ext/ae-rad/ae-rad-libs.rb', line 1006

def ArcadiaContract.publish_action(_method)
  _info = EventInfo.new(_method)
  @@actions = Array.new if !defined?(@@actions)
  @@actions << _info
end

Instance Method Details

#_raise_event(_event, *args) ⇒ Object



987
988
989
990
991
992
993
# File 'ext/ae-rad/ae-rad-libs.rb', line 987

def _raise_event(_event, *args)
   changed
   notify_observers(_event, *args)
   if self.class != ArcadiaContract
     self.class.superclass.instance._raise_event(_event, *args)
   end
end

#raise_action(_event_signature, _tobj, *args) ⇒ Object

protected :_raise_event



996
997
998
# File 'ext/ae-rad/ae-rad-libs.rb', line 996

def raise_action(_event_signature, _tobj, *args)
   _raise_action(_event_forge(_event_signature, _tobj),*args)
end

#raise_event(_event_signature, _tobj, *args) ⇒ Object



983
984
985
# File 'ext/ae-rad/ae-rad-libs.rb', line 983

def raise_event(_event_signature, _tobj, *args)
   _raise_event(_event_forge(_event_signature, _tobj),*args)
end