Class: VagrantBindfs::Bindfs::Validators::Config

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/vagrant-bindfs/bindfs/validators/config.rb

Direct Known Subclasses

Runtime

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(folder) ⇒ Config

Returns a new instance of Config.



15
16
17
18
# File 'lib/vagrant-bindfs/bindfs/validators/config.rb', line 15

def initialize(folder)
  @folder   = folder
  @errors   = []
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



10
11
12
# File 'lib/vagrant-bindfs/bindfs/validators/config.rb', line 10

def errors
  @errors
end

#folderObject (readonly)

Returns the value of attribute folder.



9
10
11
# File 'lib/vagrant-bindfs/bindfs/validators/config.rb', line 9

def folder
  @folder
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


20
21
22
23
24
25
26
# File 'lib/vagrant-bindfs/bindfs/validators/config.rb', line 20

def valid?
  @errors = []
  validate_source!
  validate_destination!
  validate_options!
  @errors.empty?
end