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.
38 lines
739 B
38 lines
739 B
# frozen_string_literal: true
|
|
|
|
module Analyze
|
|
module Graph
|
|
class AllParent
|
|
def to_s
|
|
"All Parent"
|
|
end
|
|
|
|
def slug
|
|
"all-parent"
|
|
end
|
|
|
|
def columns(construct:)
|
|
construct.scales.parent_scales.map do |scale|
|
|
Analyze::Graph::Column::Parent::Scale.new(scale:)
|
|
end
|
|
end
|
|
|
|
def source
|
|
Analyze::Source::AllData.new(slices: [slice], graph: self)
|
|
end
|
|
|
|
def slice
|
|
Analyze::Slice::AllData.new(graph: self)
|
|
end
|
|
|
|
def group
|
|
Analyze::Group::Base.new(name: nil, slug: nil, graph: nil)
|
|
end
|
|
|
|
def show_irrelevancy_message?(construct:)
|
|
construct.survey_items.parent_items.count.zero?
|
|
end
|
|
end
|
|
end
|
|
end
|