Class: FortranFormatParser::Flush

Inherits:
Struct
  • Object
show all
Defined in:
ext/fortio/lib/fortio/fortran_format.rb,
ext/fortio/lib/fortio/fortran_format.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



189
190
191
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 189

def count
  @count
end

Instance Method Details

#count_argsObject



199
200
201
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 199

def count_args
  return count
end

#inspectObject



202
203
204
205
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 202

def inspect
  count_str = count == 1 ? "" : count.to_s
  return "#{count_str}/"
end

#read(io, list, state) ⇒ Object



194
195
196
197
198
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 194

def read (io, list, state)
  count.times do 
    io.gets
  end
end

#write(io, list, state) ⇒ Object



191
192
193
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 191

def write (io, list, state)
  io << "\n" * count
end