Class: Degica::ObjectCollection
Instance Method Summary
collapse
Methods inherited from Collection
#<<, #initialize
Methods included from Actionable
#do, #prompt
Instance Method Details
3
4
5
|
# File 'lib/degica/collections/object_collection.rb', line 3
def actions
map { |obj| Action.new(obj.name, obj) }
end
|
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/degica/collections/object_collection.rb', line 7
def describe
if empty?
nil
else
desc = []
desc << "There are some objects here:"
desc << "[" + map(&:name).join(',') + "]"
desc.join("\n")
end
end
|