Class: OpenGraphPlus::Namespace::Base
- Inherits:
-
Object
- Object
- OpenGraphPlus::Namespace::Base
show all
- Includes:
- Enumerable
- Defined in:
- lib/opengraphplus/namespace.rb
Instance Method Summary
collapse
Instance Method Details
#each(&block) ⇒ Object
10
|
# File 'lib/opengraphplus/namespace.rb', line 10
def each(&block) = tags.each(&block)
|
#render_in(_view_context = nil) ⇒ Object
16
17
18
|
# File 'lib/opengraphplus/namespace.rb', line 16
def render_in(_view_context = nil)
map { |tag| tag.render_in }.join("\n").html_safe
end
|
#tag(property, value) ⇒ Object
12
13
14
|
# File 'lib/opengraphplus/namespace.rb', line 12
def tag(property, value)
Tag.new(property, value) if value
end
|
#update(**kwargs) ⇒ Object
20
21
22
23
|
# File 'lib/opengraphplus/namespace.rb', line 20
def update(**kwargs)
kwargs.each { |key, value| public_send(:"#{key}=", value) }
self
end
|