Class: Rad::Web::Processors::EnsureNoWww

Inherits:
Conveyors::Processor show all
Defined in:
lib/rad/web/_ensure_no_www.rb

Overview

enshure domain has no www. except if there’s custom subdomain

Instance Attribute Summary

Attributes inherited from Conveyors::Processor

#next_processor

Instance Method Summary collapse

Methods inherited from Conveyors::Processor

#initialize, inspect

Constructor Details

This class inherits a constructor from Rad::Conveyors::Processor

Instance Method Details

#callObject



3
4
5
6
7
8
9
10
# File 'lib/rad/web/_ensure_no_www.rb', line 3

def call
  workspace.params.must_be.defined
  if workspace.params.format == 'html' and url_with_www?
    redirect_without_www
  else
    next_processor.call
  end
end