Class: Slideck::Metadata Private
- Inherits:
-
Object
- Object
- Slideck::Metadata
- Defined in:
- lib/slideck/metadata.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 accessing metadata configuration
Class Method Summary collapse
-
.from(metadata_converter, custom_metadata, metadata_defaults) ⇒ Slideck::Metadata
Create a Metadata instance from slides configuration.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Determine equivalence with another object.
-
#align ⇒ Slideck::Alignment
private
The alignment configuration.
-
#eql?(other) ⇒ Boolean
Determine equality with another object.
-
#footer ⇒ Hash{Symbol => Slideck::Alignment,String}
private
The footer configuration.
-
#hash ⇒ Integer
Generate hash value of this metadata.
-
#initialize(metadata) ⇒ Metadata
constructor
private
Create a Metadata instance.
-
#margin ⇒ Slideck::Margin
private
The margin configuration.
-
#pager ⇒ Hash{Symbol => Slideck::Alignment,String}
private
The pager configuration.
-
#symbols ⇒ Hash, ...
private
The symbols configuration.
-
#theme ⇒ Hash{Symbol => Array, String, Symbol}
private
The theme configuration.
Constructor Details
#initialize(metadata) ⇒ Metadata
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a Metadata instance
96 97 98 99 100 |
# File 'lib/slideck/metadata.rb', line 96 def initialize() @metadata = freeze end |
Class Method Details
.from(metadata_converter, custom_metadata, metadata_defaults) ⇒ Slideck::Metadata
Create a Metadata instance from slides configuration
22 23 24 25 26 |
# File 'lib/slideck/metadata.rb', line 22 def self.from(, , ) validate_keys(.keys) new(.merge(.convert())) end |
Instance Method Details
#==(other) ⇒ Boolean
Determine equivalence with another object
115 116 117 118 119 120 |
# File 'lib/slideck/metadata.rb', line 115 def ==(other) other.is_a?(self.class) && @metadata.keys.all? do |name| send(name) == other.send(name) end end |
#align ⇒ Slideck::Alignment
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The alignment configuration
63 |
# File 'lib/slideck/metadata.rb', line 63 :align |
#eql?(other) ⇒ Boolean
Determine equality with another object
134 135 136 137 138 139 |
# File 'lib/slideck/metadata.rb', line 134 def eql?(other) instance_of?(other.class) && @metadata.keys.all? do |name| send(name).eql?(other.send(name)) end end |
#footer ⇒ Hash{Symbol => Slideck::Alignment,String}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The footer configuration
68 |
# File 'lib/slideck/metadata.rb', line 68 :footer |
#hash ⇒ Integer
Generate hash value of this metadata
149 150 151 |
# File 'lib/slideck/metadata.rb', line 149 def hash [self.class, *@metadata.keys.map { |name| send(name) }].hash end |
#margin ⇒ Slideck::Margin
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The margin configuration
73 |
# File 'lib/slideck/metadata.rb', line 73 :margin |
#pager ⇒ Hash{Symbol => Slideck::Alignment,String}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The pager configuration
78 |
# File 'lib/slideck/metadata.rb', line 78 :pager |
#symbols ⇒ Hash, ...
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The symbols configuration
83 |
# File 'lib/slideck/metadata.rb', line 83 :symbols |
#theme ⇒ Hash{Symbol => Array, String, Symbol}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The theme configuration
88 |
# File 'lib/slideck/metadata.rb', line 88 :theme |