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.



15
16
17
# File 'lib/seorel/controller/params.rb', line 15

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

Instance Method Details

#descriptionObject



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

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

#imageObject



39
40
41
# File 'lib/seorel/controller/params.rb', line 39

def image
  config.image || default_options.default_image
end

#keywordsObject



35
36
37
# File 'lib/seorel/controller/params.rb', line 35

def keywords
  default_options.default_keywords
end

#open_graph_extrasObject



43
44
45
# File 'lib/seorel/controller/params.rb', line 43

def open_graph_extras
  default_options.default_og_metas
end

#titleObject



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

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

#twitter_extrasObject



47
48
49
# File 'lib/seorel/controller/params.rb', line 47

def twitter_extras
  default_options.default_twitter_metas
end