Class: ActiveMac::Object

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mac/object.rb

Direct Known Subclasses

App

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(applescript_reference) ⇒ Object

Create a new object from an AppleScript reference, complete with accessors based on dictionary



9
10
11
12
13
14
# File 'lib/active_mac/object.rb', line 9

def initialize(applescript_reference)
  # raise ArgumentError, "Objects must be initialized from an Appscript::Reference" unless applescript_reference.instance_of? Appscript::Reference
  self.reference = applescript_reference
  build_properties
  build_commands
end

Instance Attribute Details

#referenceObject

Holds a reference to the original AppleScript object



6
7
8
# File 'lib/active_mac/object.rb', line 6

def reference
  @reference
end