Class: DevSystem::TextFileShell
- Inherits:
-
FileShell
- Object
- Liza::Unit
- Liza::Controller
- Shell
- FileShell
- DevSystem::TextFileShell
- Defined in:
- lib/dev_system/subsystems/shell/shells/text_file_shell.rb
Instance Attribute Summary collapse
-
#new_lines ⇒ Object
Returns the value of attribute new_lines.
-
#old_lines ⇒ Object
readonly
Returns the value of attribute old_lines.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#relative_path ⇒ Object
readonly
Returns the value of attribute relative_path.
Attributes inherited from Liza::Controller
Instance Method Summary collapse
-
#initialize(path) ⇒ TextFileShell
constructor
A new instance of TextFileShell.
Methods inherited from FileShell
_raise_if_blank, _raise_if_not_exists, category_for, copy, directory?, exist?, file?, gitkeep, read_binary, read_text, remove, size, symbolic_link?, touch, write_binary, write_text
Methods inherited from Shell
all, cruby?, engine, jruby?, linux?, mac?, os, ruby_version, unix?, windows?
Methods inherited from Liza::Controller
#`, `, attr_accessor, attr_reader, attr_writer, #attrs, box, #box, call, color, division, division!, division?, inherited, menv_accessor, menv_reader, menv_writer, on_connected, panel, #panel, plural, require, requirements, sh, #sh, singular, subsystem, subsystem!, subsystem?, subsystem_token, token
Methods inherited from Liza::Unit
_erbs_for, #add, add, cl, #cl, class_methods_defined, const_added, const_missing, constants_defined, define_error, descendants_select, division, erbs_available, erbs_defined, erbs_for, errors, #fetch, fetch, get, #get, instance_methods_defined, log, #log, log?, #log?, #log_array, log_array, log_hash, #log_hash, #log_level, log_level, #log_level?, log_level?, log_levels, #log_levels, #log_render_convert, #log_render_format, #log_render_in, #log_render_out, method_added, methods_defined, namespace, part, raise_error, #raise_error, reload!, #reload!, #render, #render!, #render_stack, renderable_formats_for, renderable_names, section, sections, #set, set, #settings, settings, singleton_method_added, sleep, #sleep, stick, #stick, sticks, #sticks, subclasses_select, subunits, system, #system, system?, test_class, time_diff, #time_diff
Constructor Details
#initialize(path) ⇒ TextFileShell
Returns a new instance of TextFileShell.
8 9 10 11 12 |
# File 'lib/dev_system/subsystems/shell/shells/text_file_shell.rb', line 8 def initialize(path) @path = Pathname(path) @relative_path = Pathname(path).relative_path_from(App.root) @old_lines = TextShell.read_lines path end |
Instance Attribute Details
#new_lines ⇒ Object
Returns the value of attribute new_lines.
6 7 8 |
# File 'lib/dev_system/subsystems/shell/shells/text_file_shell.rb', line 6 def new_lines @new_lines end |
#old_lines ⇒ Object (readonly)
Returns the value of attribute old_lines.
5 6 7 |
# File 'lib/dev_system/subsystems/shell/shells/text_file_shell.rb', line 5 def old_lines @old_lines end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/dev_system/subsystems/shell/shells/text_file_shell.rb', line 5 def path @path end |
#relative_path ⇒ Object (readonly)
Returns the value of attribute relative_path.
5 6 7 |
# File 'lib/dev_system/subsystems/shell/shells/text_file_shell.rb', line 5 def relative_path @relative_path end |