Class: Appscript::Reference
- Inherits:
-
Object
- Object
- Appscript::Reference
- Defined in:
- lib/appscript/reference.rb
Overview
:nodoc:
Instance Method Summary collapse
- #identify ⇒ Object
-
#todos ⇒ Object
:nodoc:.
Instance Method Details
#identify ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/appscript/reference.rb', line 9 def identify name = self.to_s.match(/Things.app"\)\.([^\.]*)/)[1] begin name = name.gsub('_', '') # inflections name = 'persons' if name == 'people' Things.const_get(name.capitalize[0..-2]) rescue NameError nil end end |
#todos ⇒ Object
:nodoc:
5 6 7 |
# File 'lib/appscript/reference.rb', line 5 def todos to_dos end |