Sha256: c176e8c414329857e0a0fc6b547cab624ab022da497a1900b7eb1de2a4ba460c

Contents?: true

Size: 522 Bytes

Versions: 12

Compression:

Stored size: 522 Bytes

Contents

module LinkedIn
  module Industry
    def self.all
      LinkedIn::API::Industries::INDUSTRIES
    end

    def self.[](code)
      find_by_code(code)
    end

    def self.find_by_code(code)
      all.detect { |indust| indust[:code] == code }
    end

    def self.find_by_group(*groups)
      all.reject { |indust| (groups & indust[:group]) != groups }
    end

    def self.find_by_description(description)
      all.detect { |indust| indust[:description].to_s.downcase == description.to_s.downcase }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
linkedin2-0.0.13 lib/linkedin/industry.rb
linkedin2-0.0.12 lib/linkedin/industry.rb
linkedin2-0.0.11 lib/linkedin/industry.rb
linkedin2-0.0.10 lib/linkedin/industry.rb
linkedin2-0.0.9 lib/linkedin/industry.rb
linkedin2-0.0.8 lib/linkedin/industry.rb
linkedin2-0.0.7 lib/linkedin/industry.rb
linkedin2-0.0.6 lib/linkedin/industry.rb
linkedin2-0.0.5 lib/linkedin/industry.rb
linkedin2-0.0.4 lib/linkedin/industry.rb
linkedin2-0.0.3 lib/linkedin/industry.rb
linkedin2-0.0.2 lib/linkedin/industry.rb