Class: RubySync::Association

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_sync/event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, key) ⇒ Association

Returns a new instance of Association.



29
30
31
32
# File 'lib/ruby_sync/event.rb', line 29

def initialize(context, key)
  @context = context
  @key = key
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



21
22
23
# File 'lib/ruby_sync/event.rb', line 21

def context
  @context
end

#keyObject

Returns the value of attribute key.



21
22
23
# File 'lib/ruby_sync/event.rb', line 21

def key
  @key
end

Class Method Details

.delimiterObject



27
# File 'lib/ruby_sync/event.rb', line 27

def self.delimiter; '$'; end

Instance Method Details

#to_sObject



34
35
36
# File 'lib/ruby_sync/event.rb', line 34

def to_s
  "#{context}#{self.class.delimiter}#{key}"
end