| Class | RDoc::AnyMethod |
| In: |
code_objects.rb
parsers/parse_f95.rb |
| Parent: | CodeObject |
Extend AnyMethod class for parse_f95.rb Original class is defined in code_objects.rb.
| aliases | [R] | |
| block_params | [RW] | |
| call_seq | [RW] | |
| dont_rename_initialize | [RW] | |
| is_alias_for | [RW] | |
| name | [RW] | |
| singleton | [RW] | |
| visibility | [RW] |
# File code_objects.rb, line 930
930: def initialize(text, name)
931: super()
932: @text = text
933: @name = name
934: @token_stream = nil
935: @visibility = :public
936: @dont_rename_initialize = false
937: @block_params = nil
938: @aliases = []
939: @is_alias_for = nil
940: @comment = ""
941: @call_seq = nil
942: end
# File parsers/parse_f95.rb, line 659
659: def <=>(other)
660: t = @name <=> other.name
661: return t if t != 0
662: t = @params <=> other.params
663: return t if t != 0
664: t = @comment <=> other.comment
665: end
# File code_objects.rb, line 968
968: def param_seq
969: p = params.gsub(/\s*\#.*/, '')
970: p = p.tr("\n", " ").squeeze(" ")
971: p = "(" + p + ")" unless p[0] == ?(
972:
973: if (block = block_params)
974: # If this method has explicit block parameters, remove any
975: # explicit &block
976: $stderr.puts p
977: p.sub!(/,?\s*&\w+/)
978: $stderr.puts p
979:
980: block.gsub!(/\s*\#.*/, '')
981: block = block.tr("\n", " ").squeeze(" ")
982: if block[0] == ?(
983: block.sub!(/^\(/, '').sub!(/\)/, '')
984: end
985: p << " {|#{block}| ...}"
986: end
987: p
988: end
moved to parse_f95.rb #
!# !# def <=>(other) !# t = @name <=> other.name !# return t if t != 0 !# t = @params <=> other.params !# return t if t != 0 !# t = @comment <=> other.comment !# end !#
moved to parse_f95.rb #
# File code_objects.rb, line 962
962: def to_s
963: res = self.class.name + ": " + @name + " (" + @text + ")\n"
964: res << @comment.to_s
965: res
966: end