Class: Imageomatic::Opengraph::Model
- Inherits:
-
Struct
- Object
- Struct
- Imageomatic::Opengraph::Model
- Includes:
- ActionView::Helpers::OutputSafetyHelper
- Defined in:
- app/models/imageomatic/opengraph/model.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#image ⇒ Object
Returns the value of attribute image.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
3 4 5 |
# File 'app/models/imageomatic/opengraph/model.rb', line 3 def description @description end |
#image ⇒ Object
Returns the value of attribute image
3 4 5 |
# File 'app/models/imageomatic/opengraph/model.rb', line 3 def image @image end |
#title ⇒ Object
Returns the value of attribute title
3 4 5 |
# File 'app/models/imageomatic/opengraph/model.rb', line 3 def title @title end |
Instance Method Details
#metatags ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/models/imageomatic/opengraph/model.rb', line 6 def Enumerator.new do |y| each_pair do |property, content| y << Metatag.new(property, content) if content.present? end end end |
#to_html ⇒ Object
14 15 16 |
# File 'app/models/imageomatic/opengraph/model.rb', line 14 def to_html safe_join .map(&:to_html), "\n" end |