Class: VagrantBindfs::Bindfs::Folder
- Inherits:
-
Object
- Object
- VagrantBindfs::Bindfs::Folder
- Defined in:
- lib/vagrant-bindfs/bindfs/folder.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#hook ⇒ Object
readonly
Returns the value of attribute hook.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(hook, source, destination, options = {}) ⇒ Folder
constructor
A new instance of Folder.
- #merge!(options) ⇒ Object
- #reverse_merge!(options) ⇒ Object
- #to_version!(version) ⇒ Object
Constructor Details
#initialize(hook, source, destination, options = {}) ⇒ Folder
Returns a new instance of Folder.
13 14 15 16 17 18 19 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 13 def initialize(hook, source, destination, = {}) @hook = hook @source = source @destination = destination @options = Bindfs::OptionSet.new(nil, ) end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
8 9 10 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 8 def destination @destination end |
#hook ⇒ Object (readonly)
Returns the value of attribute hook.
8 9 10 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 8 def hook @hook end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 8 def @options end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
8 9 10 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 8 def source @source end |
Instance Method Details
#id ⇒ Object
21 22 23 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 21 def id @id ||= Digest::SHA1.new.digest(destination) end |
#merge!(options) ⇒ Object
29 30 31 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 29 def merge!() @options = @options.merge() end |
#reverse_merge!(options) ⇒ Object
25 26 27 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 25 def reverse_merge!() @options = Bindfs::OptionSet.new(nil, ).merge(@options) end |
#to_version!(version) ⇒ Object
33 34 35 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 33 def to_version!(version) @options = @options.to_version(version) end |