Module: PacerXml

Defined in:
lib/pacer-xml.rb,
lib/pacer-xml/sample.rb,
lib/pacer-xml/version.rb,
lib/pacer-xml/xml_route.rb,
lib/pacer-xml/build_graph.rb

Defined Under Namespace

Modules: Sample, XmlRoute Classes: BuildGraph, BuildGraphCached, GraphVisitor

Constant Summary collapse

START_TIME =
Time.now
VERSION =
'0.2.2'
PACER_VERSION =
'>= 1.1.1'

Class Method Summary collapse

Class Method Details

.reload!Object

Reload all Ruby modified files in the pacer-xml library. Useful for debugging in the console. Does not do any of the fancy stuff that Rails reloading does. Certain types of changes will still require restarting the session.



19
20
21
22
23
24
25
26
27
28
# File 'lib/pacer-xml.rb', line 19

def reload!
  require 'pathname'
  Pathname.new(File.expand_path(__FILE__)).parent.find do |path|
    if path.extname == '.rb' and path.mtime > reload_time
      puts path.to_s
      load path.to_s
    end
  end
  @reload_time = Time.now
end

.reload_timeObject

Returns the time pacer-xml was last reloaded (or when it was started).



8
9
10
11
12
13
14
# File 'lib/pacer-xml.rb', line 8

def reload_time
  if defined? @reload_time
    @reload_time
  else
    START_TIME
  end
end