Class: Ag::Object

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, id) ⇒ Object

Returns a new instance of Object.



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

def initialize(type, id)
  @type = type
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/ag/object.rb', line 4

def id
  @id
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/ag/object.rb', line 3

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
# File 'lib/ag/object.rb', line 11

def ==(other)
  self.class == other.class &&
    self.type == other.type &&
    self.id == other.id
end