Method: MicroMicro::Relationship#to_h

Defined in:
lib/micro_micro/relationship.rb

#to_hHash{Symbol => String}

Return the parsed MicroMicro::Relationship as a Hash.

Returns:

  • (Hash{Symbol => String})


63
64
65
66
67
68
69
70
71
72
73
# File 'lib/micro_micro/relationship.rb', line 63

def to_h
  {
    href: href,
    rels: rels,
    hreflang: hreflang,
    media: media,
    title: title,
    type: type,
    text: text
  }.compact_blank!
end