Class: WatchFile
- Inherits:
-
Object
- Object
- WatchFile
- Defined in:
- lib/codefusion/watch_file.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#full_path ⇒ Object
readonly
Returns the value of attribute full_path.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(filename) ⇒ WatchFile
constructor
refactor: use actual Ruby file objects so that fusion command supports path-completion in ARGV.
- #update ⇒ Object
Constructor Details
#initialize(filename) ⇒ WatchFile
refactor: use actual Ruby file objects so that fusion command supports path-completion in ARGV
4 5 6 7 8 |
# File 'lib/codefusion/watch_file.rb', line 4 def initialize(filename) #refactor: use actual Ruby file objects so that fusion command supports path-completion in ARGV @name = filename @full_path = Dir.pwd + "/" + @name @content = read_file end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
2 3 4 |
# File 'lib/codefusion/watch_file.rb', line 2 def content @content end |
#full_path ⇒ Object (readonly)
Returns the value of attribute full_path.
2 3 4 |
# File 'lib/codefusion/watch_file.rb', line 2 def full_path @full_path end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/codefusion/watch_file.rb', line 2 def name @name end |
Instance Method Details
#update ⇒ Object
10 11 12 |
# File 'lib/codefusion/watch_file.rb', line 10 def update @content = read_file end |