Rename clusters to singular names

This commit is contained in:
YNH Webdev
2013-09-20 19:22:46 +02:00
parent 24474e6b31
commit 0a2883e040
12 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
note
description: "Summary description for {WSF_AUTOCOMPLETION}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
WSF_AUTOCOMPLETION
feature
autocompletion (input: STRING): JSON_ARRAY
deferred
end
template: detachable STRING
end

View File

@@ -0,0 +1,46 @@
note
description: "Summary description for {WSF_SIMPLE_AUTOCOMPLETION}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_SIMPLE_AUTOCOMPLETION
inherit
WSF_AUTOCOMPLETION
create
make
feature {NONE}
make (l: ITERABLE [STRING])
do
list := l
end
feature -- Implementation
autocompletion (input: STRING): JSON_ARRAY
local
o: JSON_OBJECT
do
create Result.make_array
across
list as c
loop
if c.item.as_lower.has_substring (input.as_lower) then
create o.make
o.put (create {JSON_STRING}.make_json (c.item), "value")
Result.add (o)
end
end
end
feature
list: ITERABLE [STRING]
end