Class: FortranFormatParser::NodeS
- Inherits:
-
Struct
- Object
- Struct
- FortranFormatParser::NodeS
- Defined in:
- ext/fortio/lib/fortio/fortran_format.rb,
ext/fortio/lib/fortio/fortran_format.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #count_args ⇒ Object
- #inspect ⇒ Object
- #read(io, list, state) ⇒ Object
- #write(io, list, state) ⇒ Object
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text
208 209 210 |
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 208 def text @text end |
Instance Method Details
#count_args ⇒ Object
216 217 218 |
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 216 def count_args return 0 end |
#inspect ⇒ Object
219 220 221 222 223 224 225 |
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 219 def inspect if text !~ /'/ return "'" + text + "'" else return '"' + text.gsub(/"/, '""') + '"' end end |
#read(io, list, state) ⇒ Object
213 214 215 |
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 213 def read (io, list, state) raise RuntimeError, "constant string for reading" end |
#write(io, list, state) ⇒ Object
210 211 212 |
# File 'ext/fortio/lib/fortio/fortran_format.rb', line 210 def write (io, list, state) io << text end |