Class: CleanUp::Conditions::Size
- Inherits:
-
Object
- Object
- CleanUp::Conditions::Size
- Defined in:
- lib/clean_up/conditions/size.rb
Overview
TODO: size conditions format
Instance Method Summary collapse
-
#initialize(*value) ⇒ Size
constructor
A new instance of Size.
- #match?(file) ⇒ Boolean
Constructor Details
#initialize(*value) ⇒ Size
Returns a new instance of Size.
5 6 7 |
# File 'lib/clean_up/conditions/size.rb', line 5 def initialize(*value) @pattern = parse(value.first) end |
Instance Method Details
#match?(file) ⇒ Boolean
9 10 11 |
# File 'lib/clean_up/conditions/size.rb', line 9 def match?(file) @pattern.cover?(File.size(file)) end |