Class: Filter::ByDate
Instance Method Summary collapse
- #get(pattern) ⇒ Object
-
#initialize(date) ⇒ ByDate
constructor
A new instance of ByDate.
Methods inherited from Base
Constructor Details
#initialize(date) ⇒ ByDate
Returns a new instance of ByDate.
92 93 94 95 96 |
# File 'lib/mailhandler/receiving/filter.rb', line 92 def initialize(date) @date = date end |
Instance Method Details
#get(pattern) ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/mailhandler/receiving/filter.rb', line 98 def get(pattern) files = super(pattern) files.select { |filename| file = nil begin file = File.new(filename) rescue # skip file reading if file is not there anymore end file.ctime > @date if (file != nil) } end |