Class: CalFilter::ResourceWrapper

Inherits:
Object
  • Object
show all
Includes:
TripIt
Defined in:
lib/calfilter.rb,
lib/calfilter/tripit.rb

Direct Known Subclasses

CalendarWrapper

Constant Summary

Constants included from TripIt

TripIt::EVENT_TYPES

Instance Method Summary collapse

Methods included from TripIt

#tripit_type

Constructor Details

#initialize(delegate, kind) ⇒ ResourceWrapper

Returns a new instance of ResourceWrapper.



21
22
23
24
# File 'lib/calfilter.rb', line 21

def initialize(delegate, kind)
  @delegate = delegate
  @kind = kind
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args, &block) ⇒ Object



46
47
48
# File 'lib/calfilter.rb', line 46

def method_missing(symbol, *args, &block)
  __delegate__.send(symbol, *args, &block)
end

Instance Method Details

#__action__Object



30
31
32
# File 'lib/calfilter.rb', line 30

def __action__
  @keep_or_remove || :default
end

#__delegate__Object



26
27
28
# File 'lib/calfilter.rb', line 26

def __delegate__
  @delegate
end

#__kind__Object



34
35
36
# File 'lib/calfilter.rb', line 34

def __kind__
  @kind
end

#keepObject



42
43
44
# File 'lib/calfilter.rb', line 42

def keep
  __flag__ :keep
end

#removeObject



38
39
40
# File 'lib/calfilter.rb', line 38

def remove
  __flag__ :remove
end