Module: ByStar::Directional

Included in:
Base
Defined in:
lib/by_star/directional.rb

Instance Method Summary collapse

Instance Method Details

#after(*args) ⇒ Object Also known as: after_now



14
15
16
17
18
19
20
# File 'lib/by_star/directional.rb', line 14

def after(*args)
  with_by_star_options(*args) do |time, options|
    field = by_star_start_field(options)
    time = ByStar::Normalization.time(time)
    by_star_after_query(self, field, time)
  end
end

#before(*args) ⇒ Object Also known as: before_now



5
6
7
8
9
10
11
# File 'lib/by_star/directional.rb', line 5

def before(*args)
  with_by_star_options(*args) do |time, options|
    field = by_star_start_field(options)
    time = ByStar::Normalization.time(time)
    by_star_before_query(self, field, time)
  end
end

#newest(*args) ⇒ Object



29
30
31
32
33
# File 'lib/by_star/directional.rb', line 29

def newest(*args)
  with_by_star_options(*args) do |time, options|
    newest_query(options)
  end
end

#oldest(*args) ⇒ Object



23
24
25
26
27
# File 'lib/by_star/directional.rb', line 23

def oldest(*args)
  with_by_star_options(*args) do |time, options|
    oldest_query(options)
  end
end