Module: Rubyzen::Providers::SourceCodeProvider

Overview

Provides access to the raw source code text of a declaration.

Instance Method Summary collapse

Instance Method Details

#source_codeString

Returns the source code of this declaration.

Returns:

  • (String)

    the source code of this declaration



6
7
8
# File 'lib/rubyzen/providers/source_code_provider.rb', line 6

def source_code
  node.loc.expression.source
end