Module: LinkedIn::Industries
- Defined in:
- lib/linkedin/industries.rb
Class Method Summary collapse
- .[](code) ⇒ Object
- .all ⇒ Object
- .find_by_code(code) ⇒ Object
- .find_by_description(description) ⇒ Object
- .find_by_group(*groups) ⇒ Object
- .find_group_names(*groups) ⇒ Object
Class Method Details
.[](code) ⇒ Object
7 8 9 |
# File 'lib/linkedin/industries.rb', line 7 def self.[](code) find_by_code code end |
.all ⇒ Object
3 4 5 |
# File 'lib/linkedin/industries.rb', line 3 def self.all LinkedIn::INDUSTRIES end |
.find_by_code(code) ⇒ Object
11 12 13 |
# File 'lib/linkedin/industries.rb', line 11 def self.find_by_code(code) all.detect { |indust| indust[:code] == code } end |
.find_by_description(description) ⇒ Object
19 20 21 |
# File 'lib/linkedin/industries.rb', line 19 def self.find_by_description(description) all.detect { |indust| normalize_description(indust[:description]) == normalize_description(description) } end |
.find_by_group(*groups) ⇒ Object
15 16 17 |
# File 'lib/linkedin/industries.rb', line 15 def self.find_by_group(*groups) all.reject { |indust| (groups & indust[:group]) != groups } end |