Class: Trellis::Route

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

Overview

– Route – A route object encapsulates an event, the event destination (target), the event source and an optional event value

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination, event = nil, source = nil, value = nil) ⇒ Route

Returns a new instance of Route.



354
355
356
# File 'lib/trellis/trellis.rb', line 354

def initialize(destination, event = nil, source = nil, value = nil)
  @destination, @event, @source, @value = destination, event, source, value
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



352
353
354
# File 'lib/trellis/trellis.rb', line 352

def destination
  @destination
end

#eventObject (readonly)

Returns the value of attribute event.



352
353
354
# File 'lib/trellis/trellis.rb', line 352

def event
  @event
end

#sourceObject (readonly)

Returns the value of attribute source.



352
353
354
# File 'lib/trellis/trellis.rb', line 352

def source
  @source
end

#valueObject (readonly)

Returns the value of attribute value.



352
353
354
# File 'lib/trellis/trellis.rb', line 352

def value
  @value
end