From fdecb6843ba8c5b0f718225f343017e11fa7f711 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Fri, 18 Feb 2005 21:22:52 +0000 Subject: rename service* to web_service*. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionservice/lib/action_service/api/abstract.rb | 60 ++++++++--------- .../lib/action_service/api/action_controller.rb | 37 +++++----- actionservice/lib/action_service/base.rb | 4 +- actionservice/lib/action_service/container.rb | 78 +++++++++++----------- actionservice/lib/action_service/invocation.rb | 6 +- .../lib/action_service/protocol/abstract.rb | 6 +- actionservice/lib/action_service/protocol/soap.rb | 28 ++++---- .../lib/action_service/protocol/xmlrpc.rb | 6 +- .../lib/action_service/router/action_controller.rb | 30 +++++---- actionservice/lib/action_service/router/wsdl.rb | 6 +- actionservice/lib/action_service/struct.rb | 7 +- .../lib/action_service/support/signature.rb | 2 +- 12 files changed, 128 insertions(+), 142 deletions(-) (limited to 'actionservice/lib') diff --git a/actionservice/lib/action_service/api/abstract.rb b/actionservice/lib/action_service/api/abstract.rb index 33ed603bfe..aab37a285d 100644 --- a/actionservice/lib/action_service/api/abstract.rb +++ b/actionservice/lib/action_service/api/abstract.rb @@ -11,12 +11,6 @@ module ActionService # :nodoc: module ClassMethods # Attaches ActionService API +definition+ to the calling class. # - # If +definition+ is not an ActionService::API::Base derivative class - # object, it may be a symbol or a string, in which case a file named - # definition_api.rb will be expected to exist in the load path, - # containing an API definition class named DefinitionAPI or - # DefinitionApi. - # # Action Controllers can have a default associated API, removing the need # to call this method if you follow the Action Service naming conventions. # @@ -28,7 +22,7 @@ module ActionService # :nodoc: # ==== Service class example # # class MyService < ActionService::Base - # service_api MyAPI + # web_service_api MyAPI # end # # class MyAPI < ActionService::API::Base @@ -38,50 +32,50 @@ module ActionService # :nodoc: # ==== Controller class example # # class MyController < ActionController::Base - # service_api MyAPI + # web_service_api MyAPI # end # # class MyAPI < ActionService::API::Base # ... # end - def service_api(definition=nil) + def web_service_api(definition=nil) if definition.nil? - read_inheritable_attribute("service_api") + read_inheritable_attribute("web_service_api") else if definition.is_a?(Symbol) - raise(APIError, "symbols can only be used for #service_api inside of a controller") + raise(APIError, "symbols can only be used for #web_service_api inside of a controller") end unless definition.respond_to?(:ancestors) && definition.ancestors.include?(Base) raise(APIError, "#{definition.to_s} is not a valid API definition") end - write_inheritable_attribute("service_api", definition) - call_service_api_callbacks(self, definition) + write_inheritable_attribute("web_service_api", definition) + call_web_service_api_callbacks(self, definition) end end - def add_service_api_callback(&block) # :nodoc: - write_inheritable_array("service_api_callbacks", [block]) + def add_web_service_api_callback(&block) # :nodoc: + write_inheritable_array("web_service_api_callbacks", [block]) end private - def call_service_api_callbacks(container_class, definition) - (read_inheritable_attribute("service_api_callbacks") || []).each do |block| + def call_web_service_api_callbacks(container_class, definition) + (read_inheritable_attribute("web_service_api_callbacks") || []).each do |block| block.call(container_class, definition) end end end - # A service API class specifies the methods that will be available for + # A web service API class specifies the methods that will be available for # invocation for an API. It also contains metadata such as the method type # signature hints. # # It is not intended to be instantiated. # - # It is attached to service implementation classes like ActionService::Base - # and ActionController::Base derivatives with ClassMethods#service_api. + # It is attached to web service implementation classes like + # ActionService::Base and ActionController::Base derivatives by using + # ClassMethods#web_service_api. class Base - # Whether to transform API method names into camel-cased - # names + # Whether to transform the public API method names into camel-cased names class_inheritable_option :inflect_names, true # If present, the name of a method to call when the remote caller @@ -96,13 +90,13 @@ module ActionService # :nodoc: include ActionService::Signature # API methods have a +name+, which must be the Ruby method name to use when - # performing the invocation on the service object. + # performing the invocation on the web service object. # - # The type signature hints for the method input parameters and return value - # can by specified in +options+. + # The signatures for the method input parameters and return value can + # by specified in +options+. # - # A signature hint is an array of one or more parameter type specifiers. - # A type specifier can be one of the following: + # A signature is an array of one or more parameter specifiers. + # A parameter specifier can be one of the following: # # * A symbol or string of representing one of the Action Service base types. # See ActionService::Signature for a canonical list of the base types. @@ -113,15 +107,15 @@ module ActionService # :nodoc: # * A Hash containing as key the name of the parameter, and as value # one of the three preceding items # - # If no method input parameter or method return value hints are given, - # the method is assumed to take no parameters and return no values of + # If no method input parameter or method return value signatures are given, + # the method is assumed to take no parameters and/or return no values of # interest, and any values that are received by the server will be # discarded and ignored. # # Valid options: - # [:expects] Signature hint for the method input parameters - # [:returns] Signature hint for the method return value - # [:expects_and_returns] Signature hint for both input parameters and return value + # [:expects] Signature for the method input parameters + # [:returns] Signature for the method return value + # [:expects_and_returns] Signature for both input parameters and return value def api_method(name, options={}) validate_options([:expects, :returns, :expects_and_returns], options.keys) if options[:expects_and_returns] @@ -133,7 +127,7 @@ module ActionService # :nodoc: end expects = canonical_signature(expects) if expects returns = canonical_signature(returns) if returns - if expects && Object.const_defined?('ActiveRecord') + if expects expects.each do |param| klass = signature_parameter_class(param) klass = klass[0] if klass.is_a?(Array) diff --git a/actionservice/lib/action_service/api/action_controller.rb b/actionservice/lib/action_service/api/action_controller.rb index 7ea0a0d3bd..d603f3a570 100644 --- a/actionservice/lib/action_service/api/action_controller.rb +++ b/actionservice/lib/action_service/api/action_controller.rb @@ -5,40 +5,35 @@ module ActionService # :nodoc: base.class_eval do class << self alias_method :inherited_without_api, :inherited - alias_method :service_api_without_require, :service_api + alias_method :web_service_api_without_require, :web_service_api end end base.extend(ClassMethods) end module ClassMethods - # Creates a _protected_ factory method with the given - # +name+. This method will create a +protocol+ client connected - # to the given endpoint URL. + # Creates a client for accessing remote web services, using the + # given +protocol+ to communicate with the +endpoint_uri+. # # ==== Example # # class MyController < ActionController::Base - # client_api :blogger, :xmlrpc, "http://blogger.com/myblog/api/RPC2", :handler_name => 'blogger' + # web_client_api :blogger, :xmlrpc, "http://blogger.com/myblog/api/RPC2", :handler_name => 'blogger' # end # # In this example, a protected method named blogger will # now exist on the controller, and calling it will return the # XML-RPC client object for working with that remote service. # - # The same rules as ActionService::API::Base#service_api are - # used to retrieve the API definition with the given +name+. - # # +options+ is the set of protocol client specific options, - # see the protocol client class for details. + # see a protocol client class for details. # - # If your API definition does not exist on the load path - # with the correct rules for it to be found, you can - # pass through the API definition class in +options+, using - # a key of :api - def client_api(name, protocol, endpoint_uri, options={}) + # If your API definition does not exist on the load path with the + # correct rules for it to be found using +name+, you can pass through + # the API definition class in +options+, using a key of :api + def web_client_api(name, protocol, endpoint_uri, options={}) unless method_defined?(name) - api_klass = options.delete(:api) || require_api(name) + api_klass = options.delete(:api) || require_web_service_api(name) class_eval do define_method(name) do probe_protocol_client(api_klass, protocol, endpoint_uri, options) @@ -48,18 +43,18 @@ module ActionService # :nodoc: end end - def service_api(definition=nil) # :nodoc: - return service_api_without_require if definition.nil? + def web_service_api(definition=nil) # :nodoc: + return web_service_api_without_require if definition.nil? case definition when String, Symbol - klass = require_api(definition) + klass = require_web_service_api(definition) else klass = definition end - service_api_without_require(klass) + web_service_api_without_require(klass) end - def require_api(name) # :nodoc: + def require_web_service_api(name) # :nodoc: case name when String, Symbol file_name = name.to_s.underscore + "_api" @@ -88,7 +83,7 @@ module ActionService # :nodoc: private def inherited(child) inherited_without_api(child) - child.service_api(child.controller_path) + child.web_service_api(child.controller_path) rescue Exception => e end end diff --git a/actionservice/lib/action_service/base.rb b/actionservice/lib/action_service/base.rb index c3a1747106..05fd2afd34 100644 --- a/actionservice/lib/action_service/base.rb +++ b/actionservice/lib/action_service/base.rb @@ -12,7 +12,7 @@ module ActionService # :nodoc: # ==== Example # # class PersonService < ActionService::Base - # service_api PersonAPI + # web_service_api PersonAPI # # def find_person(criteria) # Person.find_all [...] @@ -36,6 +36,6 @@ module ActionService # :nodoc: class Base # Whether to report exceptions back to the caller in the protocol's exception # format - class_inheritable_option :service_exception_reporting, true + class_inheritable_option :web_service_exception_reporting, true end end diff --git a/actionservice/lib/action_service/container.rb b/actionservice/lib/action_service/container.rb index b2317fc941..282e6ad928 100644 --- a/actionservice/lib/action_service/container.rb +++ b/actionservice/lib/action_service/container.rb @@ -5,40 +5,40 @@ module ActionService # :nodoc: def self.append_features(base) # :nodoc: super - base.class_inheritable_option(:service_dispatching_mode, :direct) - base.class_inheritable_option(:service_exception_reporting, true) + base.class_inheritable_option(:web_service_dispatching_mode, :direct) + base.class_inheritable_option(:web_service_exception_reporting, true) base.extend(ClassMethods) base.send(:include, ActionService::Container::InstanceMethods) end module ClassMethods - # Declares a service that will provides access to the API of the given - # service +object+. +object+ must be an ActionService::Base derivative. + # Declares a web service that will provides access to the API of the given + # +object+. +object+ must be an ActionService::Base derivative. # - # Service object creation can either be _immediate_, where the object + # Web service object creation can either be _immediate_, where the object # instance is given at class definition time, or _deferred_, where # object instantiation is delayed until request time. # - # ==== Immediate service object example + # ==== Immediate web service object example # # class ApiController < ApplicationController - # service_dispatching_mode :delegated + # web_service_dispatching_mode :delegated # - # service :person, PersonService.new + # web_service :person, PersonService.new # end # # For deferred instantiation, a block should be given instead of an # object instance. This block will be executed in controller instance # context, so it can rely on controller instance variables being present. # - # ==== Deferred service object example + # ==== Deferred web service object example # # class ApiController < ApplicationController - # service_dispatching_mode :delegated + # web_service_dispatching_mode :delegated # - # service(:person) { PersonService.new(@request.env) } + # web_service(:person) { PersonService.new(@request.env) } # end - def service(name, object=nil, &block) + def web_service(name, object=nil, &block) if (object && block_given?) || (object.nil? && block.nil?) raise(ContainerError, "either service, or a block must be given") end @@ -48,56 +48,56 @@ module ActionService # :nodoc: else info = { name => { :object => object } } end - write_inheritable_hash("action_services", info) - call_service_definition_callbacks(self, name, info) + write_inheritable_hash("web_services", info) + call_web_service_definition_callbacks(self, name, info) end # Whether this service contains a service with the given +name+ - def has_service?(name) - services.has_key?(name.to_sym) + def has_web_service?(name) + web_services.has_key?(name.to_sym) end - def services # :nodoc: - read_inheritable_attribute("action_services") || {} + def web_services # :nodoc: + read_inheritable_attribute("web_services") || {} end - def add_service_definition_callback(&block) # :nodoc: - write_inheritable_array("service_definition_callbacks", [block]) + def add_web_service_definition_callback(&block) # :nodoc: + write_inheritable_array("web_service_definition_callbacks", [block]) end private - def call_service_definition_callbacks(container_class, service_name, service_info) - (read_inheritable_attribute("service_definition_callbacks") || []).each do |block| - block.call(container_class, service_name, service_info) + def call_web_service_definition_callbacks(container_class, web_service_name, service_info) + (read_inheritable_attribute("web_service_definition_callbacks") || []).each do |block| + block.call(container_class, web_service_name, service_info) end end end module InstanceMethods # :nodoc: - def service_object(service_name) - info = self.class.services[service_name.to_sym] + def web_service_object(web_service_name) + info = self.class.web_services[web_service_name.to_sym] unless info - raise(ContainerError, "no such service '#{service_name}'") + raise(ContainerError, "no such web service '#{web_service_name}'") end service = info[:block] service ? instance_eval(&service) : info[:object] end private - def dispatch_service_request(protocol_request) - case service_dispatching_mode + def dispatch_web_service_request(protocol_request) + case web_service_dispatching_mode when :direct - dispatch_direct_service_request(protocol_request) + dispatch_direct_web_service_request(protocol_request) when :delegated - dispatch_delegated_service_request(protocol_request) + dispatch_delegated_web_service_request(protocol_request) else - raise(ContainerError, "unsupported dispatching mode '#{service_dispatching_mode}'") + raise(ContainerError, "unsupported dispatching mode :#{web_service_dispatching_mode}") end end - def dispatch_direct_service_request(protocol_request) + def dispatch_direct_web_service_request(protocol_request) public_method_name = protocol_request.public_method_name - api = self.class.service_api + api = self.class.web_service_api method_name = api.api_method_name(public_method_name) block = nil expects = nil @@ -164,10 +164,10 @@ module ActionService # :nodoc: protocol_request.marshal(result) end - def dispatch_delegated_service_request(protocol_request) - service_name = protocol_request.service_name - service = service_object(service_name) - api = service.class.service_api + def dispatch_delegated_web_service_request(protocol_request) + web_service_name = protocol_request.web_service_name + service = web_service_object(web_service_name) + api = service.class.web_service_api public_method_name = protocol_request.public_method_name method_name = api.api_method_name(public_method_name) @@ -197,7 +197,7 @@ module ActionService # :nodoc: invocation.params = protocol_request.unmarshal invocation.method_name = method_name.to_sym else - raise(ContainerError, "no such method /#{service_name}##{public_method_name}") + raise(ContainerError, "no such method /#{web_service_name}##{public_method_name}") end end end @@ -221,7 +221,7 @@ module ActionService # :nodoc: invocation.method_name = method_name.to_sym invocation.type = ActionService::Invocation::UnpublishedConcreteInvocation else - raise(ContainerError, "no such method /#{service_name}##{public_method_name}") + raise(ContainerError, "no such method /#{web_service_name}##{public_method_name}") end result = perform_invoke.call end diff --git a/actionservice/lib/action_service/invocation.rb b/actionservice/lib/action_service/invocation.rb index f20b546c5a..f35ab76386 100644 --- a/actionservice/lib/action_service/invocation.rb +++ b/actionservice/lib/action_service/invocation.rb @@ -17,7 +17,7 @@ module ActionService # :nodoc: # and after method invocations on ActionService::Base objects. # # When running in _Direct_ dispatching mode, ActionController filters - # should be used for this functionality. + # should be used for this functionality instead. # # The semantics of invocation interceptors are the same as ActionController # filters, and accept the same parameters and options. @@ -147,8 +147,8 @@ module ActionService # :nodoc: def perform_invocation(invocation) if invocation.concrete? unless self.respond_to?(invocation.method_name) && \ - self.class.service_api.has_api_method?(invocation.method_name) - raise InvocationError, "no such service method '#{invocation.method_name}'" + self.class.web_service_api.has_api_method?(invocation.method_name) + raise InvocationError, "no such web service method '#{invocation.method_name}' on service object" end end params = invocation.params diff --git a/actionservice/lib/action_service/protocol/abstract.rb b/actionservice/lib/action_service/protocol/abstract.rb index ed41c49951..bd02b6e829 100644 --- a/actionservice/lib/action_service/protocol/abstract.rb +++ b/actionservice/lib/action_service/protocol/abstract.rb @@ -89,15 +89,15 @@ module ActionService # :nodoc: attr :protocol attr :raw_body - attr_accessor :service_name + attr_accessor :web_service_name attr_accessor :public_method_name attr_accessor :content_type - def initialize(protocol, raw_body, service_name, public_method_name, content_type, options={}) + def initialize(protocol, raw_body, web_service_name, public_method_name, content_type, options={}) super(options) @protocol = protocol @raw_body = raw_body - @service_name = service_name + @web_service_name = web_service_name @public_method_name = public_method_name @content_type = content_type end diff --git a/actionservice/lib/action_service/protocol/soap.rb b/actionservice/lib/action_service/protocol/soap.rb index 24cc554b05..993e174e52 100644 --- a/actionservice/lib/action_service/protocol/soap.rb +++ b/actionservice/lib/action_service/protocol/soap.rb @@ -297,34 +297,34 @@ module ActionService # :nodoc: alias :map :lookup def map_container_services(container, &block) - dispatching_mode = container.service_dispatching_mode - services = nil + dispatching_mode = container.web_service_dispatching_mode + web_services = nil case dispatching_mode when :direct - api = container.class.service_api + api = container.class.web_service_api if container.respond_to?(:controller_class_name) - service_name = container.controller_class_name.sub(/Controller$/, '').underscore + web_service_name = container.controller_class_name.sub(/Controller$/, '').underscore else - service_name = container.class.name.demodulize.underscore + web_service_name = container.class.name.demodulize.underscore end - services = { service_name => api } + web_services = { web_service_name => api } when :delegated - services = {} - container.class.services.each do |service_name, service_info| + web_services = {} + container.class.web_services.each do |web_service_name, web_service_info| begin - object = container.service_object(service_name) + object = container.web_service_object(web_service_name) rescue Exception => e - raise(ProtocolError, "failed to retrieve service object for mapping: #{e.message}") + raise(ProtocolError, "failed to retrieve web service object for web service '#{web_service_name}': #{e.message}") end - services[service_name] = object.class.service_api + web_services[web_service_name] = object.class.web_service_api end end - services.each do |service_name, api| + web_services.each do |web_service_name, api| if api.nil? - raise(ProtocolError, "no service API set while in :#{dispatching_mode} mode") + raise(ProtocolError, "no web service API set while in :#{dispatching_mode} mode") end map_api(api) do |api_methods| - yield service_name, api, api_methods if block_given? + yield web_service_name, api, api_methods if block_given? end end end diff --git a/actionservice/lib/action_service/protocol/xmlrpc.rb b/actionservice/lib/action_service/protocol/xmlrpc.rb index 7d29868b59..32b8e00327 100644 --- a/actionservice/lib/action_service/protocol/xmlrpc.rb +++ b/actionservice/lib/action_service/protocol/xmlrpc.rb @@ -28,9 +28,6 @@ module ActionService # :nodoc: end class XmlRpcProtocol < AbstractProtocol # :nodoc: - - public - def self.create_protocol_request(container_class, action_pack_request) helper = XMLRPC::XmlRpcHelper.instance service_name = action_pack_request.parameters['action'] @@ -160,7 +157,7 @@ module ActionService # :nodoc: case name when 'system.listMethods' methods = [] - api = service_class.service_api + api = service_class.web_service_api api.api_methods.each do |name, info| methods << api.public_api_method_name(name) end @@ -181,7 +178,6 @@ module ActionService # :nodoc: end end end - end end end diff --git a/actionservice/lib/action_service/router/action_controller.rb b/actionservice/lib/action_service/router/action_controller.rb index 01bd298bce..ca9c94e35c 100644 --- a/actionservice/lib/action_service/router/action_controller.rb +++ b/actionservice/lib/action_service/router/action_controller.rb @@ -2,8 +2,8 @@ module ActionService # :nodoc: module Router # :nodoc: module ActionController # :nodoc: def self.append_features(base) # :nodoc: - base.add_service_api_callback do |container_class, api| - if container_class.service_dispatching_mode == :direct && !container_class.method_defined?(:api) + base.add_web_service_api_callback do |container_class, api| + if container_class.web_service_dispatching_mode == :direct container_class.class_eval <<-EOS def api process_action_service_request @@ -11,8 +11,8 @@ module ActionService # :nodoc: EOS end end - base.add_service_definition_callback do |klass, name, info| - if klass.service_dispatching_mode == :delegated + base.add_web_service_definition_callback do |klass, name, info| + if klass.web_service_dispatching_mode == :delegated klass.class_eval <<-EOS def #{name} process_action_service_request @@ -31,13 +31,15 @@ module ActionService # :nodoc: begin protocol_request = probe_request_protocol(self.request) rescue Exception => e - logger.error "Invalid request: #{e.message}" - logger.error self.request.raw_post + unless logger.nil? + logger.error "Invalid request: #{e.message}" + logger.error self.request.raw_post + end raise end if protocol_request log_request(protocol_request) - protocol_response = dispatch_service_request(protocol_request) + protocol_response = dispatch_web_service_request(protocol_request) log_response(protocol_response) response_options = { :type => protocol_response.content_type, @@ -45,20 +47,20 @@ module ActionService # :nodoc: } send_data(protocol_response.raw_body, response_options) else - logger.fatal "Invalid Action Service service or method requested" + logger.fatal "Invalid Action Service service or method requested" unless logger.nil? render_text 'Internal protocol error', "500 Invalid service/method" end rescue Exception => e log_error e unless logger.nil? exc_response = nil - case service_dispatching_mode + case web_service_dispatching_mode when :direct - if self.class.service_exception_reporting + if self.class.web_service_exception_reporting exc_response = protocol_request.protocol.marshal_exception(e) end when :delegated - service_object = service_object(protocol_request.service_name) rescue nil - if service_object && service_object.class.service_exception_reporting + web_service = web_service_object(protocol_request.service_name) rescue nil + if web_service && web_service.class.web_service_exception_reporting exc_response = protocol_request.protocol.marshal_exception(e) rescue nil end end @@ -77,9 +79,9 @@ module ActionService # :nodoc: def log_request(protocol_request) unless logger.nil? - service_name = protocol_request.service_name + web_service_name = protocol_request.web_service_name method_name = protocol_request.public_method_name - logger.info "\nProcessing Action Service Request: #{service_name}##{method_name}" + logger.info "\nProcessing Action Service Request: #{web_service_name}##{method_name}" logger.info "Raw Request Body:" logger.info protocol_request.raw_body end diff --git a/actionservice/lib/action_service/router/wsdl.rb b/actionservice/lib/action_service/router/wsdl.rb index ececa63322..c2f29da0b0 100644 --- a/actionservice/lib/action_service/router/wsdl.rb +++ b/actionservice/lib/action_service/router/wsdl.rb @@ -46,7 +46,7 @@ module ActionService # :nodoc: def to_wsdl(container, uri, soap_action_base) wsdl = "" - service_dispatching_mode = container.service_dispatching_mode + web_service_dispatching_mode = container.web_service_dispatching_mode mapper = container.class.soap_mapper namespace = mapper.custom_namespace wsdl_service_name = namespace.split(/:/)[1] @@ -152,7 +152,7 @@ module ActionService # :nodoc: api_methods.each do |method_name, method_signature| public_name = service_api.public_api_method_name(method_name) xm.operation('name' => public_name) do - case service_dispatching_mode + case web_service_dispatching_mode when :direct soap_action = soap_action_base + "/api/" + public_name when :delegated @@ -183,7 +183,7 @@ module ActionService # :nodoc: services.each do |service_name, service_values| port_name = port_name_for(wsdl_service_name, service_name) binding_name = binding_name_for(wsdl_service_name, service_name) - case service_dispatching_mode + case web_service_dispatching_mode when :direct binding_target = 'api' when :delegated diff --git a/actionservice/lib/action_service/struct.rb b/actionservice/lib/action_service/struct.rb index 8f2718883e..142127b052 100644 --- a/actionservice/lib/action_service/struct.rb +++ b/actionservice/lib/action_service/struct.rb @@ -14,16 +14,15 @@ module ActionService # member :lastname, :string # member :email, :string # end + # person = Person.new(:id => 5, :firstname => 'john', :lastname => 'doe') # # Active Record model classes are already implicitly supported for method # return signatures. A structure containing its columns as members will be # automatically generated if its present in a signature. - # - # The structure class Struct # If a Hash is given as argument to an ActionService::Struct constructor, - # containing as key the member name, and its associated initial value + # it can contain initial values for the structure member. def initialize(values={}) if values.is_a?(Hash) values.map{|k,v| send('%s=' % k.to_s, v)} @@ -38,7 +37,7 @@ module ActionService class << self include ActionService::Signature - # Creates a structure member accessible using +name+. Generates + # Creates a structure member with the specified +name+ and +type+. Generates # accessor methods for reading and writing the member value. def member(name, type) write_inheritable_hash("struct_members", name => signature_parameter_class(type)) diff --git a/actionservice/lib/action_service/support/signature.rb b/actionservice/lib/action_service/support/signature.rb index f7aae61a3f..946118c523 100644 --- a/actionservice/lib/action_service/support/signature.rb +++ b/actionservice/lib/action_service/support/signature.rb @@ -1,5 +1,5 @@ module ActionService # :nodoc: - # Action Service parameter type specifiers may contain symbols or strings + # Action Service parameter specifiers may contain symbols or strings # instead of Class objects, for a limited set of base types. # # This provides an unambiguous way to specify that a given parameter -- cgit v1.2.3