Class: Driskell::Listen::Adapter::SimulatedDarwin::FakeEvent
- Inherits:
-
Object
- Object
- Driskell::Listen::Adapter::SimulatedDarwin::FakeEvent
- Defined in:
- lib/driskell-listen/adapter/simulated_darwin.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
Instance Method Summary collapse
-
#initialize(watched_dir, event) ⇒ FakeEvent
constructor
A new instance of FakeEvent.
- #real_path ⇒ Object
Constructor Details
#initialize(watched_dir, event) ⇒ FakeEvent
13 14 15 16 17 18 19 |
# File 'lib/driskell-listen/adapter/simulated_darwin.rb', line 13 def initialize(watched_dir, event) # NOTE: avoid using event.absolute_name since new API # will need to have a custom recursion implemented # to properly match events to configured directories @real_path = full_path(event).relative_path_from(watched_dir) @dir = "#{Pathname(watched_dir) + dir_for_event(event, @real_path)}/" end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
11 12 13 |
# File 'lib/driskell-listen/adapter/simulated_darwin.rb', line 11 def dir @dir end |
Instance Method Details
#real_path ⇒ Object
21 22 23 |
# File 'lib/driskell-listen/adapter/simulated_darwin.rb', line 21 def real_path @real_path.to_s end |