class GitTimeMachine::TimeMachine
Attributes
delorean[R]
flux_capacitor[R]
Public Class Methods
new()
click to toggle source
# File lib/git_time_machine/time_machine.rb, line 11 def initialize @flux_capacitor = GitTimeMachine::FluxCapacitor.new @delorean = GitTimeMachine::Delorean.new end
Public Instance Methods
back_to(year_string)
click to toggle source
# File lib/git_time_machine/time_machine.rb, line 26 def back_to(year_string) year = year_string.to_i now = Time.now new_time_space_continuum = Time.new( year, now.month, now.day, now.hour, now.min, now.sec ) puts "*********************************************" puts "Time Travel Succeeded" puts "*********************************************" puts "The Time Now is: #{new_time_space_continuum.strftime("%I:%M%p on %A %d %B %Y")}" end
flux_capacitated?()
click to toggle source
# File lib/git_time_machine/time_machine.rb, line 22 def flux_capacitated? flux_capacitor.capacitated? end
get_ready!()
click to toggle source
# File lib/git_time_machine/time_machine.rb, line 16 def get_ready! flux_capacitor.setup flux_capacitor.capacitate! delorean.accelerate(88) end