Sha256: fe534ab70f67e4a7b2821f39d733ec015e48002f270be215cbedcf285df4db57
Contents?: true
Size: 544 Bytes
Versions: 9
Compression:
Stored size: 544 Bytes
Contents
class Guide::NavigationView delegate :id, :name, :leaf_node?, :to => :@node def initialize(bouncer:, node:, active_node:) @bouncer = bouncer @node = node @active_node = active_node end def child_node_views @node.child_nodes.map do |child_node_id, child_node| self.class.new(bouncer: @bouncer, node: child_node, active_node: @active_node) end end def visible_to_user? @bouncer.user_can_access?(@node) end def active? @node == @active_node end end
Version data entries
9 entries across 9 versions & 1 rubygems