Class: AutoAdmin::Association

Inherits:
Object
  • Object
show all
Defined in:
lib/auto_admin/association.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, name) ⇒ Association

Returns a new instance of Association.



5
6
7
8
# File 'lib/auto_admin/association.rb', line 5

def initialize(node, name)
  self.node = node
  self.name = name.to_s
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/auto_admin/association.rb', line 3

def name
  @name
end

#nodeObject

Returns the value of attribute node.



3
4
5
# File 'lib/auto_admin/association.rb', line 3

def node
  @node
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
# File 'lib/auto_admin/association.rb', line 10

def ==(other)
  node == other.node && name == other.name
end