Class: OmniFocus::Thingy

Inherits:
Object show all
Defined in:
lib/omnifocus.rb

Direct Known Subclasses

Context, Project, Task

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(of, thing) ⇒ Thingy

Returns a new instance of Thingy.



614
615
616
617
# File 'lib/omnifocus.rb', line 614

def initialize of, thing
  @omnifocus = of
  @thing = thing
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *a) ⇒ Object



623
624
625
626
# File 'lib/omnifocus.rb', line 623

def method_missing m, *a
  warn [m,*a].inspect
  thing.send m, *a
end

Instance Attribute Details

#omnifocusObject

Returns the value of attribute omnifocus.



613
614
615
# File 'lib/omnifocus.rb', line 613

def omnifocus
  @omnifocus
end

#thingObject

Returns the value of attribute thing.



613
614
615
# File 'lib/omnifocus.rb', line 613

def thing
  @thing
end

Instance Method Details

#activeObject



619
620
621
# File 'lib/omnifocus.rb', line 619

def active
  its.completed.eq(false)
end

#idObject



632
633
634
# File 'lib/omnifocus.rb', line 632

def id
  thing.id_.get
end

#inspectObject



636
637
638
# File 'lib/omnifocus.rb', line 636

def inspect
  "#{self.class}[#{self.id}]"
end

#nameObject



628
629
630
# File 'lib/omnifocus.rb', line 628

def name
  thing.name.get
end