Class: XSD::CodeGen::MethodDef
- Includes:
- CommentDef, GenSupport
- Defined in:
- lib/action_web_service/xsd/codegen/methoddef.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
Attributes included from CommentDef
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(name, *params) ⇒ MethodDef
constructor
A new instance of MethodDef.
Methods included from GenSupport
capitalize, #format, keyword?, safeconstname, safeconstname?, safemethodname, safemethodname?, safevarname, safevarname?, uncapitalize
Constructor Details
#initialize(name, *params) ⇒ MethodDef
Returns a new instance of MethodDef.
23 24 25 26 27 28 29 30 31 |
# File 'lib/action_web_service/xsd/codegen/methoddef.rb', line 23 def initialize(name, *params) unless safemethodname?(name) raise ArgumentError.new("name '#{name}' seems to be unsafe") end @name = name @params = params @comment = nil @definition = yield if block_given? end |
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition.
21 22 23 |
# File 'lib/action_web_service/xsd/codegen/methoddef.rb', line 21 def definition @definition end |
Instance Method Details
#dump ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/action_web_service/xsd/codegen/methoddef.rb', line 33 def dump buf = "" buf << dump_comment if @comment buf << dump_method_def buf << dump_definition if @definition and !@definition.empty? buf << dump_method_def_end buf end |