Class: Hephaestus::Actions::StripCommentsAction
- Inherits:
-
Object
- Object
- Hephaestus::Actions::StripCommentsAction
- Defined in:
- lib/hephaestus/actions/strip_comments_action.rb
Defined Under Namespace
Classes: BackwardStringScanner, StripComments, StripLeadingScopeNewlines
Class Method Summary collapse
Class Method Details
.call(source) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/hephaestus/actions/strip_comments_action.rb', line 10 def call(source) parser = Parser::CurrentRuby.new source .then { |s| strip_comments(s, parser) } .then { |s| strip_trailing_whitespace(s) } .then { |s| strip_dup_newlines(s) } .then { |s| strip_leading_scope_newlines(s, parser) } end |