Class: Ogg::Generator::StructuredProperty

Inherits:
Property
  • Object
show all
Defined in:
lib/ogg/generator.rb

Instance Attribute Summary

Attributes inherited from Property

#content, #property

Instance Method Summary collapse

Methods inherited from Property

#[], #[]=, #add_child, #changed?, #method_missing

Constructor Details

#initialize(property, options = {}) ⇒ StructuredProperty

Returns a new instance of StructuredProperty.



64
65
66
67
68
# File 'lib/ogg/generator.rb', line 64

def initialize(property, options = {})
  @property    = property
  @parent      = options[:parent]
  @alternative = options[:alternative]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ogg::Generator::Property

Instance Method Details

#alternative?Boolean

Returns:

  • (Boolean)


70
71
72
# File 'lib/ogg/generator.rb', line 70

def alternative?
  @alternative
end

#meta_tagObject



74
75
76
# File 'lib/ogg/generator.rb', line 74

def meta_tag
  "<meta property=\"og:#{@parent}:#{@property}\" content=\"#{content}\">"
end