Module: Traitify::Client::Major
- Included in:
- Traitify::Client
- Defined in:
- lib/traitify/client/majors.rb
Instance Method Summary collapse
- #major(id) ⇒ Object (also: #find_major)
-
#majors(options = {}) ⇒ Object
(also: #find_majors)
Valid options are - page - majors_per_page - experience_levels.
Instance Method Details
#major(id) ⇒ Object Also known as: find_major
17 18 19 20 21 |
# File 'lib/traitify/client/majors.rb', line 17 def major(id) response = get("/majors/#{id}") Hashie::Mash.new(response) end |
#majors(options = {}) ⇒ Object Also known as: find_majors
Valid options are
-
page
-
majors_per_page
-
experience_levels
8 9 10 11 12 13 14 |
# File 'lib/traitify/client/majors.rb', line 8 def majors( = {}) response = .empty? ? get("/majors") : get("/majors?" + .collect{ |k,v| "#{k}=#{v}" }.join("&")) response.collect { |major| Hashie::Mash.new(major) } end |