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.



13
14
15
16
# File 'lib/seorel/helper/manager.rb', line 13

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

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



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

def params
  @params
end

#requestObject (readonly)

Returns the value of attribute request.



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

def request
  @request
end

Instance Method Details

#allObject



30
31
32
# File 'lib/seorel/helper/manager.rb', line 30

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

#genericObject



18
19
20
# File 'lib/seorel/helper/manager.rb', line 18

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

#open_graphObject



22
23
24
# File 'lib/seorel/helper/manager.rb', line 22

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

#renderObject



34
35
36
# File 'lib/seorel/helper/manager.rb', line 34

def render
  all.join.html_safe
end

#twitterObject



26
27
28
# File 'lib/seorel/helper/manager.rb', line 26

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