Module: GroupedPage::InstanceMethods

Defined in:
lib/grouped_page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inherited_groupsObject (readonly)

Returns the value of attribute inherited_groups.



14
15
16
# File 'lib/grouped_page.rb', line 14

def inherited_groups
  @inherited_groups
end

Instance Method Details

#cache?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/grouped_page.rb', line 23

def cache?
  self.permitted_groups.empty?
end

#group_is_inherited?(group) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/grouped_page.rb', line 31

def group_is_inherited?(group)
  return self.has_inherited_group?(group) && !self.has_group?(group)
end

#has_inherited_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/grouped_page.rb', line 27

def has_inherited_group?(group)
  return self.inherited_groups.include?(group)
end

#permitted_groups_with_inheritanceObject



19
20
21
# File 'lib/grouped_page.rb', line 19

def permitted_groups_with_inheritance
  permitted_groups_without_inheritance + inherited_groups
end