Class: Xberg::FormatMetadataArchive

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

Overview

Metadata extracted from an archive (ZIP, TAR, 7Z, etc.).

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



1621
1622
1623
# File 'lib/xberg/native.rb', line 1621

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



1673
1674
1675
1676
# File 'lib/xberg/native.rb', line 1673

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

Instance Method Details

#archive?Boolean

Returns:

  • (Boolean)


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

def archive? = true

#audio?Boolean

Returns:

  • (Boolean)


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

def audio? = false

#bibtex?Boolean

Returns:

  • (Boolean)


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

def bibtex? = false

#citation?Boolean

Returns:

  • (Boolean)


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

def citation? = false

#code?Boolean

Returns:

  • (Boolean)


1669
1670
1671
# File 'lib/xberg/native.rb', line 1669

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

#csv?Boolean

Returns:

  • (Boolean)


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

def csv? = false

#dbf?Boolean

Returns:

  • (Boolean)


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

def dbf? = false

#docx?Boolean

Returns:

  • (Boolean)


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

def docx? = false

#email?Boolean

Returns:

  • (Boolean)


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

def email? = false

#epub?Boolean

Returns:

  • (Boolean)


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

def epub? = false

#excel?Boolean

Returns:

  • (Boolean)


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

def excel? = false

#fiction_book?Boolean

Returns:

  • (Boolean)


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

def fiction_book? = false

#html?Boolean

Returns:

  • (Boolean)


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

def html? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#jats?Boolean

Returns:

  • (Boolean)


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

def jats? = false

#ocr?Boolean

Returns:

  • (Boolean)


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

def ocr? = false

#pdf?Boolean

Returns:

  • (Boolean)


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

def pdf? = false

#pptx?Boolean

Returns:

  • (Boolean)


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

def pptx? = false

#pst?Boolean

Returns:

  • (Boolean)


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

def pst? = false

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false

#xml?Boolean

Returns:

  • (Boolean)


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

def xml? = false