Class: Umbra::EventHandler::PropertyChangeEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/umbra/eventhandler.rb

Overview

Created and sent to all listeners whenever a property is changed

See Also:

Since:

  • 1.0.5 added 2010-02-25 23:06

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, property_name, oldvalue, newvalue) ⇒ PropertyChangeEvent

Returns a new instance of PropertyChangeEvent.

Since:

  • 1.0.5 added 2010-02-25 23:06



124
125
126
# File 'lib/umbra/eventhandler.rb', line 124

def initialize source, property_name, oldvalue, newvalue
  set source, property_name, oldvalue, newvalue
end

Instance Attribute Details

#newvalueObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



123
124
125
# File 'lib/umbra/eventhandler.rb', line 123

def newvalue
  @newvalue
end

#oldvalueObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



123
124
125
# File 'lib/umbra/eventhandler.rb', line 123

def oldvalue
  @oldvalue
end

#property_nameObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



123
124
125
# File 'lib/umbra/eventhandler.rb', line 123

def property_name
  @property_name
end

#sourceObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



123
124
125
# File 'lib/umbra/eventhandler.rb', line 123

def source
  @source
end

Instance Method Details

#inspectObject

Since:

  • 1.0.5 added 2010-02-25 23:06



134
135
136
# File 'lib/umbra/eventhandler.rb', line 134

def inspect
  to_s
end

#set(source, property_name, oldvalue, newvalue) ⇒ Object

Since:

  • 1.0.5 added 2010-02-25 23:06



127
128
129
130
# File 'lib/umbra/eventhandler.rb', line 127

def set source, property_name, oldvalue, newvalue
    @source, @property_name, @oldvalue, @newvalue =
    source, property_name, oldvalue, newvalue
end

#to_sObject

Since:

  • 1.0.5 added 2010-02-25 23:06



131
132
133
# File 'lib/umbra/eventhandler.rb', line 131

def to_s
  "PROPERTY_CHANGE name: #{property_name}, oldval: #{@oldvalue}, newvalue: #{@newvalue}, source: #{@source}"
end