Module: EacRailsUtils::OpenGraphProtocolHelper

Defined in:
app/helpers/eac_rails_utils/open_graph_protocol_helper.rb

Defined Under Namespace

Classes: AbstractEntry, Entry, RootEntry

Constant Summary collapse

OGP_META_DEFAULT_PREFIX =
'og'

Instance Method Summary collapse

Instance Method Details

#ogp_meta_prefixObject



6
7
8
# File 'app/helpers/eac_rails_utils/open_graph_protocol_helper.rb', line 6

def ogp_meta_prefix
  OGP_META_DEFAULT_PREFIX
end

#ogp_meta_tagsObject



14
15
16
# File 'app/helpers/eac_rails_utils/open_graph_protocol_helper.rb', line 14

def ogp_meta_tags
  ogp_root.children_tags
end

#ogp_prefixObject



10
11
12
# File 'app/helpers/eac_rails_utils/open_graph_protocol_helper.rb', line 10

def ogp_prefix
  "#{ogp_meta_prefix}: http://ogp.me/ns#"
end

#ogp_rootObject



18
19
20
# File 'app/helpers/eac_rails_utils/open_graph_protocol_helper.rb', line 18

def ogp_root
  @ogp_root ||= RootEntry.new(self)
end

#ogp_set(data) ⇒ Object



22
23
24
# File 'app/helpers/eac_rails_utils/open_graph_protocol_helper.rb', line 22

def ogp_set(data)
  ogp_root.data = data
end