Class: VagrantBindfs::Bindfs::Validators::Config
- Inherits:
-
Object
- Object
- VagrantBindfs::Bindfs::Validators::Config
- Extended by:
- Forwardable
- Defined in:
- lib/vagrant-bindfs/bindfs/validators/config.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#folder ⇒ Object
readonly
Returns the value of attribute folder.
Instance Method Summary collapse
-
#initialize(folder) ⇒ Config
constructor
A new instance of Config.
- #valid? ⇒ Boolean
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
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
9 10 11 |
# File 'lib/vagrant-bindfs/bindfs/validators/config.rb', line 9 def errors @errors end |
#folder ⇒ Object (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
20 21 22 23 24 25 26 |
# File 'lib/vagrant-bindfs/bindfs/validators/config.rb', line 20 def valid? @errors = [] validate_source! validate_destination! @errors.empty? end |