$51 GRAYBYTE WORDPRESS FILE MANAGER $32

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby18/lib64/ruby/1.8/xsd/codegen/

HOME
Current File : /opt/alt/ruby18/lib64/ruby/1.8/xsd/codegen//methoddef.rb
# XSD4R - Generating method definition code
# Copyright (C) 2004  NAKAMURA, Hiroshi <[email protected]>.

# This program is copyrighted free software by NAKAMURA, Hiroshi.  You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.


require 'xsd/codegen/gensupport'
require 'xsd/codegen/commentdef'


module XSD
module CodeGen


class MethodDef
  include GenSupport
  include CommentDef

  attr_accessor :definition

  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

  def dump
    buf = ""
    buf << dump_comment if @comment
    buf << dump_method_def
    buf << dump_definition if @definition and [email protected]?
    buf << dump_method_def_end
    buf
  end

private

  def dump_method_def
    if @params.empty?
      format("def #{@name}")
    else
      format("def #{@name}(#{@params.join(", ")})")
    end
  end

  def dump_method_def_end
    format("end")
  end

  def dump_definition
    format(@definition, 2)
  end
end


end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.48 PM
root / linksafe
0755
classdef.rb
4.29 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
commentdef.rb
0.592 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
gensupport.rb
2.837 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
methoddef.rb
1.2 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
moduledef.rb
3.914 KB
12 Feb 2007 11.01 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF