Class: FortIO::Namelist::Reader
- Inherits:
-
Object
- Object
- FortIO::Namelist::Reader
- Defined in:
- lib/fortio-namelist/fortran_namelist.rb
Instance Attribute Summary collapse
-
#namelist ⇒ Object
readonly
Returns the value of attribute namelist.
Instance Method Summary collapse
-
#initialize(text) ⇒ Reader
constructor
A new instance of Reader.
- #parse(group, out = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#namelist ⇒ Object (readonly)
Returns the value of attribute namelist.
85 86 87 |
# File 'lib/fortio-namelist/fortran_namelist.rb', line 85 def namelist @namelist end |
Instance Method Details
#parse(group, out = {}) ⇒ Object
75 76 77 78 79 80 81 82 83 |
# File 'lib/fortio-namelist/fortran_namelist.rb', line 75 def parse (group, out={}) group = group.downcase raise "no definition of namelist group '#{group}'" \ unless nml = @namelist[group] nml.each do |paramdef| paramdef.set(out) end return out end |