Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • xsd/codegen/methoddef.rb

Class/Module Index [+]

Quicksearch

XSD::CodeGen::MethodDef

Attributes

definition[RW]

Public Class Methods

new(name, *params) click to toggle source
 
               # File 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
            

Public Instance Methods

dump() click to toggle source
 
               # File 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