Class: RDocF95::Fortran95parser::Fortran95Definition

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc-f95/parsers/parse_f95.rb

Overview

Information of arguments of subroutines and functions in Fortran95

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(varname, types, inivalue, arraysuffix, comment, nodoc = false, doc_priority = 50) ⇒ Fortran95Definition

Returns a new instance of Fortran95Definition.



2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2321

def initialize(varname, types, inivalue, arraysuffix, comment,
               nodoc=false, doc_priority=50)
  @varname = varname
  @types = types
  @inivalue = inivalue
  @arraysuffix = arraysuffix
  @comment = comment
  @nodoc = nodoc
  @doc_priority = doc_priority
end

Instance Attribute Details

#arraysuffixObject (readonly)

Suffix of array



2310
2311
2312
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2310

def arraysuffix
  @arraysuffix
end

#commentObject

Comments



2313
2314
2315
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2313

def comment
  @comment
end

#doc_priorityObject

Priority of documentation



2319
2320
2321
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2319

def doc_priority
  @doc_priority
end

#inivalueObject (readonly)

Initial Value



2307
2308
2309
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2307

def inivalue
  @inivalue
end

#nodocObject

Flag of non documentation



2316
2317
2318
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2316

def nodoc
  @nodoc
end

#typesObject (readonly)

Types of variable



2304
2305
2306
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2304

def types
  @types
end

#varnameObject (readonly)

Name of variable



2301
2302
2303
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2301

def varname
  @varname
end

Instance Method Details

#include_attr?(attr) ⇒ Boolean

If attr is included, true is returned

Returns:

  • (Boolean)


2346
2347
2348
2349
2350
2351
2352
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2346

def include_attr?(attr)
  return if !attr
  @types.split(",").each{ |type|
    return true if type.strip.chomp.upcase == attr.strip.chomp.upcase
  }
  return nil
end

#to_sObject



2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 2332

def to_s
  return <<-EOF
<Fortran95Definition: 
  varname=#{@varname}, types=#{types},
  inivalue=#{@inivalue}, arraysuffix=#{@arraysuffix}, nodoc=#{@nodoc}, 
  comment=
#{@comment}
>
EOF
end