Class: Xberg::FormatMetadataXml

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
FormatMetadata
Defined in:
lib/xberg/native.rb

Overview

Metadata extracted from an XML document.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



1737
1738
1739
# File 'lib/xberg/native.rb', line 1737

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



1789
1790
1791
1792
# File 'lib/xberg/native.rb', line 1789

def self.from_hash(hash)
  payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
  new(value: XmlMetadata.new(payload))
end

Instance Method Details

#archive?Boolean

Returns:

  • (Boolean)


1755
# File 'lib/xberg/native.rb', line 1755

def archive? = false

#audio?Boolean

Returns:

  • (Boolean)


1783
# File 'lib/xberg/native.rb', line 1783

def audio? = false

#bibtex?Boolean

Returns:

  • (Boolean)


1769
# File 'lib/xberg/native.rb', line 1769

def bibtex? = false

#citation?Boolean

Returns:

  • (Boolean)


1771
# File 'lib/xberg/native.rb', line 1771

def citation? = false

#code?Boolean

Returns:

  • (Boolean)


1785
1786
1787
# File 'lib/xberg/native.rb', line 1785

def code? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#csv?Boolean

Returns:

  • (Boolean)


1767
# File 'lib/xberg/native.rb', line 1767

def csv? = false

#dbf?Boolean

Returns:

  • (Boolean)


1775
# File 'lib/xberg/native.rb', line 1775

def dbf? = false

#docx?Boolean

Returns:

  • (Boolean)


1747
# File 'lib/xberg/native.rb', line 1747

def docx? = false

#email?Boolean

Returns:

  • (Boolean)


1751
# File 'lib/xberg/native.rb', line 1751

def email? = false

#epub?Boolean

Returns:

  • (Boolean)


1779
# File 'lib/xberg/native.rb', line 1779

def epub? = false

#excel?Boolean

Returns:

  • (Boolean)


1749
# File 'lib/xberg/native.rb', line 1749

def excel? = false

#fiction_book?Boolean

Returns:

  • (Boolean)


1773
# File 'lib/xberg/native.rb', line 1773

def fiction_book? = false

#html?Boolean

Returns:

  • (Boolean)


1763
# File 'lib/xberg/native.rb', line 1763

def html? = false

#image?Boolean

Returns:

  • (Boolean)


1757
# File 'lib/xberg/native.rb', line 1757

def image? = false

#jats?Boolean

Returns:

  • (Boolean)


1777
# File 'lib/xberg/native.rb', line 1777

def jats? = false

#ocr?Boolean

Returns:

  • (Boolean)


1765
# File 'lib/xberg/native.rb', line 1765

def ocr? = false

#pdf?Boolean

Returns:

  • (Boolean)


1745
# File 'lib/xberg/native.rb', line 1745

def pdf? = false

#pptx?Boolean

Returns:

  • (Boolean)


1753
# File 'lib/xberg/native.rb', line 1753

def pptx? = false

#pst?Boolean

Returns:

  • (Boolean)


1781
# File 'lib/xberg/native.rb', line 1781

def pst? = false

#text?Boolean

Returns:

  • (Boolean)


1761
# File 'lib/xberg/native.rb', line 1761

def text? = false

#xml?Boolean

Returns:

  • (Boolean)


1759
# File 'lib/xberg/native.rb', line 1759

def xml? = true