Class: VagrantBindfs::Bindfs::Folder
- Inherits:
-
Object
- Object
- VagrantBindfs::Bindfs::Folder
- Defined in:
- lib/vagrant-bindfs/bindfs/folder.rb
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.
14 15 16 17 18 19 20 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 14 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.
9 10 11 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 9 def destination @destination end |
#hook ⇒ Object (readonly)
Returns the value of attribute hook.
12 13 14 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 12 def hook @hook end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 10 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
22 23 24 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 22 def id @id ||= Digest::SHA1.new.digest(destination) end |
#merge!(options) ⇒ Object
30 31 32 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 30 def merge!() @options = @options.merge() end |
#reverse_merge!(options) ⇒ Object
26 27 28 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 26 def reverse_merge!() @options = Bindfs::OptionSet.new(nil, ).merge(@options) end |
#to_version!(version) ⇒ Object
34 35 36 |
# File 'lib/vagrant-bindfs/bindfs/folder.rb', line 34 def to_version!(version) @options = @options.to_version(version) end |