Class: Accord::Declarations::Declaration
Instance Method Summary
collapse
#ancestors, #bases, #bases=, #each_interface, #initialize, #inspect, #interfaces
Instance Method Details
#+(other) ⇒ Object
10
11
12
|
# File 'lib/accord/declarations.rb', line 10
def + other
Declaration.new(interfaces + other.interfaces)
end
|
#-(other) ⇒ Object
14
15
16
17
18
|
# File 'lib/accord/declarations.rb', line 14
def - other
Declaration.new(interfaces.select { |i|
!other.interfaces.any? { |j| i.extends?(j) }
})
end
|
#extends?(interface) ⇒ Boolean
6
7
8
|
# File 'lib/accord/declarations.rb', line 6
def extends?(interface)
super(interface) && interfaces.include?(interface)
end
|