method
parse
v8.1.1 -
Show latest stable
- Class:
RailInspector::Configuring::Document
parse(text)public
No documentation available.
# File tools/rail_inspector/lib/rail_inspector/configuring/document.rb, line 7
def parse(text)
before, *versioned_defaults, general_config, after =
text
.split("\n")
.slice_before do |line|
[
"#### Default Values for Target Version",
"### Rails General Configuration",
"### Configuring Assets"
].any? { |s| line.start_with?(s) }
end
.to_a
new(before, versioned_defaults.flatten.join("\n"), general_config, after)
end