Method: Imageomatic::Opengraph::Base::Property#initialize

Defined in:
app/models/imageomatic/opengraph/base.rb

#initialize(key, description = nil, default: nil) ⇒ Property

Returns a new instance of Property.



11
12
13
14
15
16
17
# File 'app/models/imageomatic/opengraph/base.rb', line 11

def initialize(key, description = nil, default: nil)
  @key = key
  @description = description
  # If we get a string like `og:image:url`, this would give us `url`
  *_, @name = key.rpartition(":")
  @default = default
end