class Engrel::PrepositionalPhrase
Public Instance Methods
active?()
click to toggle source
# File lib/engrel/prepositional_phrase.rb, line 68 def active? (started? && !ended?) rescue nil end
Also aliased as: ongoing?
ended?()
click to toggle source
# File lib/engrel/prepositional_phrase.rb, line 60 def ended?; ended_at.present?; end
ended_at()
click to toggle source
# File lib/engrel/prepositional_phrase.rb, line 56 def ended_at (references_time? && has_indirect_object?) && (ind.ended_time rescue nil || ind.ended_at rescue nil || ind.created_time rescue nil) end
Also aliased as: ends_at
has_indirect_object?()
click to toggle source
# File lib/engrel/prepositional_phrase.rb, line 40 def has_indirect_object? (self.indirect_object.present? && self.indirect_object[:id].present?) rescue false end
now()
click to toggle source
# File lib/engrel/prepositional_phrase.rb, line 64 def now @now ||= Time.now end
started?()
click to toggle source
# File lib/engrel/prepositional_phrase.rb, line 52 def started?; started_at.present?; end
Also aliased as: starts?
started_at()
click to toggle source
Time Helpers! ####
# File lib/engrel/prepositional_phrase.rb, line 48 def started_at (references_time? && has_indirect_object?) && (ind.started_time rescue nil || ind.started_at rescue nil || ind.created_time rescue nil) end
Also aliased as: starts_at