Module: Veye::Package
- Defined in:
- lib/veye/package.rb,
lib/veye/package/info.rb,
lib/veye/views/package.rb,
lib/veye/package/follow.rb,
lib/veye/package/search.rb,
lib/veye/package/references.rb,
lib/veye/views/package/info_csv.rb,
lib/veye/views/package/info_json.rb,
lib/veye/views/package/info_table.rb,
lib/veye/views/package/search_csv.rb,
lib/veye/views/package/info_pretty.rb,
lib/veye/views/package/search_json.rb,
lib/veye/views/package/search_table.rb,
lib/veye/views/package/search_pretty.rb,
lib/veye/views/package/references_csv.rb,
lib/veye/views/package/references_json.rb,
lib/veye/views/package/references_table.rb,
lib/veye/views/package/references_pretty.rb
Defined Under Namespace
Classes: Follow, Info, InfoCSV, InfoJSON, InfoPretty, InfoTable, References, ReferencesCSV, ReferencesJSON, ReferencesPretty, ReferencesTable, Search, SearchCSV, SearchJSON, SearchPretty, SearchTable
Constant Summary
collapse
- RESOURCE_PATH =
"/products"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.parse_key(package_key) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/veye/package.rb', line 15
def self.parse_key(package_key)
tokens = package_key.to_s.split('/')
lang = tokens.first
prod_key = tokens.drop(1).join("/")
if lang.nil? or prod_key.nil?
msg = %Q[
You missed language or product key.
Example: clojure/ztellman/aleph, as structured <prog lang>/<product_code>
]
printf("%s. \n%s", "Error: Malformed key.".color(:red), msg)
exit
end
[prod_key, lang]
end
|
Instance Method Details
#supported_languages ⇒ Object
11
12
13
|
# File 'lib/veye/package.rb', line 11
def supported_languages
Set.new ["Clojure", "Java", "Javascript", "Node.JS", "PHP", "Python", "Ruby", "R"]
end
|