class Shamu::Features::Conditions::ScheduleAt
Match against the current date and time.
Public Instance Methods
match?( context )
click to toggle source
(see Condition#match?
)
# File lib/shamu/features/conditions/schedule_at.rb, line 9 def match?( context ) context.time >= timestamp end
Private Instance Methods
timestamp()
click to toggle source
# File lib/shamu/features/conditions/schedule_at.rb, line 15 def timestamp @timestamp ||= case config when Date then config.to_time when String then Time.zone ? Time.zone.parse( config ) : Time.parse( config ) end end