Class: APDM::Saxo::Metadata
- Inherits:
-
Object
- Object
- APDM::Saxo::Metadata
- Defined in:
- lib/apdm/saxo/metadata.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Metadata
constructor
A new instance of Metadata.
- #to(name, path, options = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata.
16 17 18 |
# File 'lib/apdm/saxo/metadata.rb', line 16 def @metadata end |
Class Method Details
.sanitize(s) ⇒ Object
7 8 9 |
# File 'lib/apdm/saxo/metadata.rb', line 7 def sanitize(s) s.gsub(/`/, "'").gsub(/´/, '\'').gsub(/"/, '\"').gsub('<3', ':heart:').gsub(/[<>]/, '').squeeze(' ') end |
.to_iso88591(utf8_string) ⇒ Object
11 12 13 |
# File 'lib/apdm/saxo/metadata.rb', line 11 def to_iso88591(utf8_string) utf8_string.encode(Encoding::ISO_8859_1, Encoding::UTF_8, :undef => :replace) end |