You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
833 B
44 lines
833 B
# frozen_string_literal: true
|
|
|
|
module Analyze
|
|
module Graph
|
|
class StudentsByEll
|
|
attr_reader :ells
|
|
|
|
def initialize(ells:)
|
|
@ells = ells
|
|
end
|
|
|
|
def to_s
|
|
"Students by Ell"
|
|
end
|
|
|
|
def slug
|
|
"students-by-ell"
|
|
end
|
|
|
|
def columns
|
|
[].tap do |array|
|
|
ells.each do |ell|
|
|
array << Analyze::Graph::Column::Ell.new(ell:)
|
|
end
|
|
array.sort_by!(&:label)
|
|
array << Analyze::Graph::Column::AllStudent.new
|
|
end
|
|
end
|
|
|
|
def source
|
|
Analyze::Source::SurveyData.new(slices: [slice], graph: self)
|
|
end
|
|
|
|
def slice
|
|
Analyze::Slice::StudentsByGroup.new(graph: self)
|
|
end
|
|
|
|
def group
|
|
Analyze::Group::Base.new(name: "ELL", slug: "ell", graph: self)
|
|
end
|
|
end
|
|
end
|
|
end
|