Class: Acv2lrtemplate::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/acv2lrtemplate/validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filenameObject (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

Returns:

  • (Boolean)


15
16
17
# File 'lib/acv2lrtemplate/validator.rb', line 15

def invalid?
  !valid?
end

#valid?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/acv2lrtemplate/validator.rb', line 11

def valid?
  validate
end

#validateObject



19
20
21
22
# File 'lib/acv2lrtemplate/validator.rb', line 19

def validate
  validate_presence
  validate_extension
end