Class: Seafoam::Formatters::Text::SourceFormatter
- Inherits:
-
Base::SourceFormatter
- Object
- Base::SourceFormatter
- Seafoam::Formatters::Text::SourceFormatter
- Defined in:
- lib/seafoam/formatters/text.rb
Overview
A plain-text formatter for the ‘source` command.
Instance Attribute Summary
Attributes inherited from Base::SourceFormatter
Instance Method Summary collapse
Methods inherited from Base::SourceFormatter
Constructor Details
This class inherits a constructor from Seafoam::Formatters::Base::SourceFormatter
Instance Method Details
#format ⇒ Object
62 63 64 |
# File 'lib/seafoam/formatters/text.rb', line 62 def format Seafoam::Graal::Source.walk(source_position, &method(:render_method)).join("\n") end |
#render_method(method) ⇒ Object
66 67 68 69 70 |
# File 'lib/seafoam/formatters/text.rb', line 66 def render_method(method) declaring_class = method[:declaring_class] name = method[:method_name] "#{declaring_class}##{name}" end |