Class: SdocAll::BaseTask

Inherits:
Object
  • Object
show all
Defined in:
lib/sdoc_all/task.rb

Direct Known Subclasses

MergeTask, Task

Instance Method Summary collapse

Instance Method Details

#clobber?Boolean

Returns:

  • (Boolean)


21
22
23
24
25
26
27
# File 'lib/sdoc_all/task.rb', line 21

def clobber?
  full_doc_path = Base.docs_path + doc_path
  return true unless full_doc_path.exist?

  created_hash = config_hash_path.read rescue nil
  return true if created_hash != config_hash
end

#config_hashObject



5
6
7
# File 'lib/sdoc_all/task.rb', line 5

def config_hash
  Digest::SHA1.hexdigest(for_hash.inspect)
end

#config_hash_pathObject



9
10
11
# File 'lib/sdoc_all/task.rb', line 9

def config_hash_path
  Base.docs_path + doc_path + 'config.hash'
end

#created_rid_pathObject



13
14
15
# File 'lib/sdoc_all/task.rb', line 13

def created_rid_path
  Base.docs_path + doc_path + 'created.rid'
end

#last_build_timeObject



17
18
19
# File 'lib/sdoc_all/task.rb', line 17

def last_build_time
  Time.parse(created_rid_path.read) rescue nil
end