Class: Xberg::FormatMetadataHtml

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

Overview

Metadata extracted from an HTML 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



1853
1854
1855
# File 'lib/xberg/native.rb', line 1853

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



1905
1906
1907
1908
# File 'lib/xberg/native.rb', line 1905

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

Instance Method Details

#archive?Boolean

Returns:

  • (Boolean)


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

def archive? = false

#audio?Boolean

Returns:

  • (Boolean)


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

def audio? = false

#bibtex?Boolean

Returns:

  • (Boolean)


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

def bibtex? = false

#citation?Boolean

Returns:

  • (Boolean)


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

def citation? = false

#code?Boolean

Returns:

  • (Boolean)


1901
1902
1903
# File 'lib/xberg/native.rb', line 1901

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

#csv?Boolean

Returns:

  • (Boolean)


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

def csv? = false

#dbf?Boolean

Returns:

  • (Boolean)


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

def dbf? = false

#docx?Boolean

Returns:

  • (Boolean)


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

def docx? = false

#email?Boolean

Returns:

  • (Boolean)


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

def email? = false

#epub?Boolean

Returns:

  • (Boolean)


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

def epub? = false

#excel?Boolean

Returns:

  • (Boolean)


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

def excel? = false

#fiction_book?Boolean

Returns:

  • (Boolean)


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

def fiction_book? = false

#html?Boolean

Returns:

  • (Boolean)


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

def html? = true

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#jats?Boolean

Returns:

  • (Boolean)


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

def jats? = false

#ocr?Boolean

Returns:

  • (Boolean)


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

def ocr? = false

#pdf?Boolean

Returns:

  • (Boolean)


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

def pdf? = false

#pptx?Boolean

Returns:

  • (Boolean)


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

def pptx? = false

#pst?Boolean

Returns:

  • (Boolean)


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

def pst? = false

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false

#xml?Boolean

Returns:

  • (Boolean)


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

def xml? = false