Class: SyntaxTree::Index::FileComments::StringSource

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/index.rb

Overview

This represents the Ruby source in the form of a string. When it needs to be read the string is returned.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ StringSource

Returns a new instance of StringSource.



132
133
134
# File 'lib/syntax_tree/index.rb', line 132

def initialize(source)
  @source = source
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



130
131
132
# File 'lib/syntax_tree/index.rb', line 130

def source
  @source
end