Class: FiletypeValidation::BaseValidator
- Inherits:
-
Object
- Object
- FiletypeValidation::BaseValidator
- Defined in:
- lib/filetype_validation/base_validator.rb
Overview
base validator for file types
Direct Known Subclasses
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ BaseValidator
constructor
A new instance of BaseValidator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(file, options = {}) ⇒ BaseValidator
Returns a new instance of BaseValidator.
6 7 8 9 |
# File 'lib/filetype_validation/base_validator.rb', line 6 def initialize(file, = {}) @file = File.new(file) @options = end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
4 5 6 |
# File 'lib/filetype_validation/base_validator.rb', line 4 def file @file end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/filetype_validation/base_validator.rb', line 4 def @options end |
Instance Method Details
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/filetype_validation/base_validator.rb', line 11 def valid? raise NotImplementedError end |