Recursively build item sets
This commit is contained in:
1 parent
ceb7e9ee32
commit
9dffa3c41a
2 files changed
+22
-9
No files matched your search
@@ -5,13 +5,15 @@ class Imbecile
|
||||
|
||||
attr_reader :items
|
||||
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(items)
|
||||
@items = Set.new(items)
|
||||
close!
|
||||
end
|
||||
|
||||
def follow_symbols
|
||||
Set.new(@items.map(&:follow_symbol))
|
||||
Set.new(@items.map(&:follow_symbol).compact)
|
||||
end
|
||||
|
||||
def follow_set(symbol)
|
||||
|
||||
Reference in new issue
Block a user