Class: ActionWebService::Scaffolding::WebServiceModel::Service
- Inherits:
-
Object
- Object
- ActionWebService::Scaffolding::WebServiceModel::Service
- Defined in:
- lib/action_web_service/scaffolding.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#api_methods ⇒ Object
readonly
Returns the value of attribute api_methods.
-
#api_methods_full ⇒ Object
readonly
Returns the value of attribute api_methods_full.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(name, real_service) ⇒ Service
constructor
A new instance of Service.
- #to_s ⇒ Object
Constructor Details
#initialize(name, real_service) ⇒ Service
Returns a new instance of Service.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/action_web_service/scaffolding.rb', line 260 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 |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
256 257 258 |
# File 'lib/action_web_service/scaffolding.rb', line 256 def api @api end |
#api_methods ⇒ Object (readonly)
Returns the value of attribute api_methods.
257 258 259 |
# File 'lib/action_web_service/scaffolding.rb', line 257 def api_methods @api_methods end |
#api_methods_full ⇒ Object (readonly)
Returns the value of attribute api_methods_full.
258 259 260 |
# File 'lib/action_web_service/scaffolding.rb', line 258 def api_methods_full @api_methods_full end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
254 255 256 |
# File 'lib/action_web_service/scaffolding.rb', line 254 def name @name end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
255 256 257 |
# File 'lib/action_web_service/scaffolding.rb', line 255 def object @object end |
Instance Method Details
#to_s ⇒ Object
275 276 277 |
# File 'lib/action_web_service/scaffolding.rb', line 275 def to_s self.name.camelize end |