Module: OMF::SFA::ServiceAPI

Included in:
AM::RPC::AMServiceAPI
Defined in:
lib/omf-sfa/am/am-rpc/am_rpc_api.rb

Instance Method Summary collapse

Instance Method Details

#api_descriptionObject



14
15
16
17
# File 'lib/omf-sfa/am/am-rpc/am_rpc_api.rb', line 14

def api_description()
  @@declarations ||= {}
  @@declarations[self] || []
end

#declare(rpc_name, method_name, opts = {}, &block) ⇒ Object

This defines a method to declare the service methods and all their parameters.



8
9
10
11
12
# File 'lib/omf-sfa/am/am-rpc/am_rpc_api.rb', line 8

def declare(rpc_name, method_name, opts = {}, &block)
  @@declarations ||= {}
  m = (@@declarations[self] ||= [])
  m << Struct::MethodDescription.new(rpc_name.to_sym, method_name.to_sym, opts)
end