Class: Refinery::Pages::Url

Inherits:
Object
  • Object
show all
Defined in:
pages/lib/refinery/pages/url.rb

Direct Known Subclasses

Localised, Marketable, Normal

Defined Under Namespace

Classes: Localised, Marketable, Normal

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page) ⇒ Url



61
62
63
# File 'pages/lib/refinery/pages/url.rb', line 61

def initialize(page)
  @page = page
end

Class Method Details

.build(page) ⇒ Object



56
57
58
59
# File 'pages/lib/refinery/pages/url.rb', line 56

def self.build(page)
  klass = [ Localised, Marketable, Normal ].detect { |d| d.handle?(page) } || self
  klass.new(page).url
end

Instance Method Details

#urlObject

Raises:

  • (NotImplementedError)


65
66
67
# File 'pages/lib/refinery/pages/url.rb', line 65

def url
  raise NotImplementedError
end