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.



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

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



642
643
644
645
# File 'lib/omnifocus.rb', line 642

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

Instance Attribute Details

#omnifocusObject

Returns the value of attribute omnifocus.



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

def omnifocus
  @omnifocus
end

#thingObject

Returns the value of attribute thing.



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

def thing
  @thing
end

Instance Method Details

#activeObject



638
639
640
# File 'lib/omnifocus.rb', line 638

def active
  its.completed.eq(false)
end

#idObject



651
652
653
# File 'lib/omnifocus.rb', line 651

def id
  thing.id_.get
end

#inspectObject



655
656
657
# File 'lib/omnifocus.rb', line 655

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

#nameObject



647
648
649
# File 'lib/omnifocus.rb', line 647

def name
  thing.name.get
end