Class: Acv2lrtemplate::Validator
- Defined in:
- lib/acv2lrtemplate/validator.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Validator
constructor
A new instance of Validator.
- #invalid? ⇒ Boolean
- #valid? ⇒ Boolean
- #validate ⇒ Object
Constructor Details
#initialize(filename) ⇒ Validator
Returns a new instance of Validator.
7 8 9 |
# File 'lib/acv2lrtemplate/validator.rb', line 7 def initialize(filename) @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
5 6 7 |
# File 'lib/acv2lrtemplate/validator.rb', line 5 def filename @filename end |
Instance Method Details
#invalid? ⇒ Boolean
15 16 17 |
# File 'lib/acv2lrtemplate/validator.rb', line 15 def invalid? !valid? end |
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/acv2lrtemplate/validator.rb', line 11 def valid? validate end |
#validate ⇒ Object
19 20 21 22 |
# File 'lib/acv2lrtemplate/validator.rb', line 19 def validate validate_presence validate_extension end |