Class: Watchcat::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/watchcat/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kinds, paths, raw_kind) ⇒ Event

Returns a new instance of Event.



7
8
9
10
11
# File 'lib/watchcat/event.rb', line 7

def initialize(kinds, paths, raw_kind)
  @paths = paths
  @raw_kind = raw_kind
  build_kind(kinds)
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



5
6
7
# File 'lib/watchcat/event.rb', line 5

def event
  @event
end

#kindObject (readonly)

Returns the value of attribute kind.



5
6
7
# File 'lib/watchcat/event.rb', line 5

def kind
  @kind
end

#pathsObject (readonly)

Returns the value of attribute paths.



5
6
7
# File 'lib/watchcat/event.rb', line 5

def paths
  @paths
end

#raw_kindObject (readonly)

Returns the value of attribute raw_kind.



5
6
7
# File 'lib/watchcat/event.rb', line 5

def raw_kind
  @raw_kind
end

Instance Method Details

#deconstruct_keys(_keys) ⇒ Object



13
14
15
# File 'lib/watchcat/event.rb', line 13

def deconstruct_keys(_keys)
  { paths: @paths, event: @event }
end