Class: Slideck::MetadataDefaults Private
- Inherits:
-
Object
- Object
- Slideck::MetadataDefaults
- Defined in:
- lib/slideck/metadata_defaults.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.
Default metadata configuration
Instance Method Summary collapse
-
#initialize(alignment, margin) ⇒ MetadataDefaults
constructor
Create a MetadataDefaults instance.
-
#merge(custom_metadata) ⇒ Hash{Symbol => Object}
Merge given custom metadata with defaults.
Constructor Details
#initialize(alignment, margin) ⇒ MetadataDefaults
Create a MetadataDefaults instance
19 20 21 22 23 |
# File 'lib/slideck/metadata_defaults.rb', line 19 def initialize(alignment, margin) @alignment = alignment @margin = margin @defaults = create_defaults end |
Instance Method Details
#merge(custom_metadata) ⇒ Hash{Symbol => Object}
Merge given custom metadata with defaults
36 37 38 39 40 |
# File 'lib/slideck/metadata_defaults.rb', line 36 def merge() @defaults.merge() do |_, def_val, val| def_val.is_a?(::Hash) ? def_val.merge(val) : val end end |