Class: Seorel::Controller::Params

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/seorel/controller/params.rb

Instance Method Summary collapse

Constructor Details

#initialize(controller = nil) ⇒ Params

Returns a new instance of Params.



13
14
15
# File 'lib/seorel/controller/params.rb', line 13

def initialize(controller = nil)
  @controller = controller
end

Instance Method Details

#descriptionObject



25
26
27
28
29
30
31
# File 'lib/seorel/controller/params.rb', line 25

def description
  [
    self.lookup_prepend_description,
    self.base_description,
    self.lookup_append_description
  ].compact.join.html_safe
end

#imageObject



33
34
35
# File 'lib/seorel/controller/params.rb', line 33

def image
  config.image || default_options.default_image
end

#open_graph_extrasObject



37
38
39
# File 'lib/seorel/controller/params.rb', line 37

def open_graph_extras
  default_options.default_og_metas
end

#titleObject



17
18
19
20
21
22
23
# File 'lib/seorel/controller/params.rb', line 17

def title
  [
    self.lookup_prepend_title,
    self.base_title,
    self.lookup_append_title
  ].compact.join.html_safe
end

#twitter_extrasObject



41
42
43
# File 'lib/seorel/controller/params.rb', line 41

def twitter_extras
  default_options.default_twitter_metas
end