class Amaranth::Team
Public Class Methods
find_by_slug(slug)
click to toggle source
# File lib/amaranth/team.rb, line 5 def self.find_by_slug slug if attributes = Request.get("/api/teams/#{slug}/") new attributes.keep_if { |key, value| members.include? key.to_sym } end end
new(attributes={})
click to toggle source
# File lib/amaranth/team.rb, line 11 def initialize attributes={} attributes.each do |key, value| self[key] = value end end
Public Instance Methods
projects()
click to toggle source
# File lib/amaranth/team.rb, line 17 def projects Project.all(team_slug: slug) end
videos()
click to toggle source
# File lib/amaranth/team.rb, line 21 def videos Video.all(team_slug: slug) end