Class: Slideck::MetadataConverter Private

Inherits:
Object
  • Object
show all
Defined in:
lib/slideck/metadata_converter.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Responsible for converting custom metadata

Instance Method Summary collapse

Constructor Details

#initialize(alignment, margin) ⇒ MetadataConverter

Create a MetadataConverter instance

Parameters:



19
20
21
22
# File 'lib/slideck/metadata_converter.rb', line 19

def initialize(alignment, margin)
  @alignment = alignment
  @margin = margin
end

Instance Method Details

#convert(custom_metadata) ⇒ Hash{Symbol => Object}

Convert metadata values

Examples:

.convert({align: "center"})

Parameters:

  • custom_metadata (Hash{Symbol => Object})

    the custom metadata to convert

Returns:

  • (Hash{Symbol => Object})


35
36
37
38
39
# File 'lib/slideck/metadata_converter.rb', line 35

def convert()
  .each_with_object({}) do |(key, val), |
    [key] = convert_for(key, val)
  end
end