Class: Germinate::FileHunk
- Defined in:
- lib/germinate/hunk.rb
Overview
Represents a the entire text of a file on disk
Constant Summary
Constants included from SharedStyleAttributes
SharedStyleAttributes::TEXT_TRANSFORMS
Instance Method Summary collapse
-
#initialize(lines, template) ⇒ FileHunk
constructor
A new instance of FileHunk.
- #whole_file? ⇒ Boolean
Methods inherited from CodeHunk
#code_close_bracket=, #code_open_bracket=, #format_with
Methods inherited from Hunk
#[], #format_with, #index_matching, #inspect, #resolve_insertions, #slice, #strip, #to_s
Methods included from SharedStyleAttributes
#copy_attributes!, #copy_shared_style_attributes_from, #disable_all_transforms!, #shared_style_attributes
Constructor Details
#initialize(lines, template) ⇒ FileHunk
Returns a new instance of FileHunk.
174 175 176 177 |
# File 'lib/germinate/hunk.rb', line 174 def initialize(lines, template) super(lines, template) raise ArgumentError, "Path required" if source_path.nil? end |
Instance Method Details
#whole_file? ⇒ Boolean
179 180 181 |
# File 'lib/germinate/hunk.rb', line 179 def whole_file? true end |