Module: AudienceAdminSeperation::InstanceMethods

Defined in:
lib/helpers/audience_admin_seperation.rb

Instance Method Summary collapse

Instance Method Details

#admin_window?Boolean


3
# File 'lib/helpers/audience_admin_seperation.rb', line 3

def admin_window?; !owner; end

#audience_friendly_url?(url) ⇒ Boolean


5
# File 'lib/helpers/audience_admin_seperation.rb', line 5

def audience_friendly_url?(url); $audience_visible_urls.any? { |re| url =~ re }; end

#audience_window?Boolean


4
# File 'lib/helpers/audience_admin_seperation.rb', line 4

def audience_window?; !admin_window?; end

#window_heightObject


7
8
9
10
11
12
13
# File 'lib/helpers/audience_admin_seperation.rb', line 7

def window_height
  if audience_window?
    HEIGHT_AUDIENCE
  else
    HEIGHT
  end
end

#window_widthObject


15
16
17
18
19
20
21
# File 'lib/helpers/audience_admin_seperation.rb', line 15

def window_width
  if audience_window?
    WIDTH_AUDIENCE
  else
    WIDTH
  end
end