Class: RDoc::Server::FileChanges

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/server.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rdoc) ⇒ FileChanges

Returns a new instance of FileChanges.



62
63
64
65
66
67
# File 'lib/rdoc/server.rb', line 62

def initialize(rdoc)
  @rdoc = rdoc
  @changed_files = []
  @removed_files = []
  @reload_rbs_signatures = false
end

Instance Attribute Details

#changed_files ⇒ Object (readonly)

Returns the value of attribute changed_files.



60
61
62
# File 'lib/rdoc/server.rb', line 60

def changed_files
  @changed_files
end

#removed_files ⇒ Object (readonly)

Returns the value of attribute removed_files.



60
61
62
# File 'lib/rdoc/server.rb', line 60

def removed_files
  @removed_files
end

Instance Method Details

#record_changed(file) ⇒ Object



69
70
71
72
# File 'lib/rdoc/server.rb', line 69

def record_changed(file)
  reload_rbs_signatures_if_needed file
  changed_files << file
end

#record_removed(file) ⇒ Object



74
75
76
77
# File 'lib/rdoc/server.rb', line 74

def record_removed(file)
  reload_rbs_signatures_if_needed file
  removed_files << file
end

#reload_rbs_signatures? ⇒ Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/rdoc/server.rb', line 79

def reload_rbs_signatures?
  @reload_rbs_signatures
end

#source_files_changed? ⇒ Boolean

Returns:

  • (Boolean)


83
84
85
# File 'lib/rdoc/server.rb', line 83

def source_files_changed?
  !changed_files.empty? || !removed_files.empty?
end