Class: Seorel::Helper::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/seorel/helper/manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request, params) ⇒ Manager

Returns a new instance of Manager.



11
12
13
14
# File 'lib/seorel/helper/manager.rb', line 11

def initialize(request, params)
  @request = request
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



9
10
11
# File 'lib/seorel/helper/manager.rb', line 9

def params
  @params
end

#requestObject (readonly)

Returns the value of attribute request.



9
10
11
# File 'lib/seorel/helper/manager.rb', line 9

def request
  @request
end

Instance Method Details

#allObject



28
29
30
# File 'lib/seorel/helper/manager.rb', line 28

def all
  (generic.all + open_graph.all + twitter.all)
end

#genericObject



16
17
18
# File 'lib/seorel/helper/manager.rb', line 16

def generic
  @generic ||= ::Seorel::Helper::Generic.new(request, params)
end

#open_graphObject



20
21
22
# File 'lib/seorel/helper/manager.rb', line 20

def open_graph
  @open_graph ||= ::Seorel::Helper::OpenGraph.new(request, params)
end

#renderObject



32
33
34
# File 'lib/seorel/helper/manager.rb', line 32

def render
  all.join.html_safe
end

#twitterObject



24
25
26
# File 'lib/seorel/helper/manager.rb', line 24

def twitter
  @twitter ||= ::Seorel::Helper::Twitter.new(request, params)
end