Method: ActionWebService::Scaffolding::WebServiceModel::Service#initialize

Defined in:
lib/action_web_service/scaffolding.rb

#initialize(name, real_service) ⇒ Service

Returns a new instance of Service.



262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/action_web_service/scaffolding.rb', line 262

def initialize(name, real_service)
  @name = name.to_s
  @object = real_service
  @api = @object.class.web_service_api
  if @api.nil?
    raise ScaffoldingError, "No web service API attached to #{object.class}"
  end
  @api_methods = {}
  @api_methods_full = []
  @api.api_methods.each do |name, method|
    @api_methods[method.public_name.to_s] = method
    @api_methods_full << [method.to_s, method.public_name.to_s]
  end
end