class XfOOrth::StringSource
The StringSource
class used to extract fOOrth source code from a string.
Public Class Methods
new(string)
click to toggle source
Initialize from a string.
Parameters:
-
string - A string of fOOrth source code.
Calls superclass method
XfOOrth::AbstractSource::new
# File lib/fOOrth/compiler/source/string_source.rb, line 13 def initialize(string) @string_list = string.split("\n") @read_step = @string_list.each super() end
Public Instance Methods
file_name()
click to toggle source
A string source has no file name to return.
# File lib/fOOrth/compiler/source/string_source.rb, line 25 def file_name nil end
source_name()
click to toggle source
What is the source of this text?
# File lib/fOOrth/compiler/source/string_source.rb, line 20 def source_name "A string." end