Module: Ankit::EventTraversing

Extended by:
CardNaming
Included in:
CardHappening
Defined in:
lib/ankit/event_traversing_command.rb

Overview

For Command Mixin

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CardNaming

card_wildcard_for, to_card_name, to_card_path

Class Method Details

.find_latest_event_for(runtime, path) ⇒ Object



25
26
27
28
# File 'lib/ankit/event_traversing_command.rb', line 25

def self.find_latest_event_for(runtime, path)
  #EventTraversingCommand.new(runtime).to_enum(:each_event, to_card_name(path)).sort_by { |x| x.round }[-1]
  find_latest_event_named(runtime, to_card_name(path))
end

.find_latest_event_named(runtime, name) ⇒ Object



30
31
32
# File 'lib/ankit/event_traversing_command.rb', line 30

def self.find_latest_event_named(runtime, name)
  EventTraversingCommand.new(runtime).to_enum(:each_event, name).sort_by { |x| x.round }[-1]
end

Instance Method Details

#latest_event_for(path) ⇒ Object



34
# File 'lib/ankit/event_traversing_command.rb', line 34

def latest_event_for(path) EventTraversing.find_latest_event_for(self.runtime, path); end