Class: Xberg::FormatMetadataEpub

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

Overview

Metadata extracted from an EPUB e-book.

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



2317
2318
2319
# File 'lib/xberg/native.rb', line 2317

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



2369
2370
2371
2372
# File 'lib/xberg/native.rb', line 2369

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

Instance Method Details

#archive?Boolean

Returns:

  • (Boolean)


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

def archive? = false

#audio?Boolean

Returns:

  • (Boolean)


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

def audio? = false

#bibtex?Boolean

Returns:

  • (Boolean)


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

def bibtex? = false

#citation?Boolean

Returns:

  • (Boolean)


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

def citation? = false

#code?Boolean

Returns:

  • (Boolean)


2365
2366
2367
# File 'lib/xberg/native.rb', line 2365

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

#csv?Boolean

Returns:

  • (Boolean)


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

def csv? = false

#dbf?Boolean

Returns:

  • (Boolean)


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

def dbf? = false

#docx?Boolean

Returns:

  • (Boolean)


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

def docx? = false

#email?Boolean

Returns:

  • (Boolean)


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

def email? = false

#epub?Boolean

Returns:

  • (Boolean)


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

def epub? = true

#excel?Boolean

Returns:

  • (Boolean)


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

def excel? = false

#fiction_book?Boolean

Returns:

  • (Boolean)


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

def fiction_book? = false

#html?Boolean

Returns:

  • (Boolean)


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

def html? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#jats?Boolean

Returns:

  • (Boolean)


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

def jats? = false

#ocr?Boolean

Returns:

  • (Boolean)


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

def ocr? = false

#pdf?Boolean

Returns:

  • (Boolean)


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

def pdf? = false

#pptx?Boolean

Returns:

  • (Boolean)


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

def pptx? = false

#pst?Boolean

Returns:

  • (Boolean)


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

def pst? = false

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false

#xml?Boolean

Returns:

  • (Boolean)


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

def xml? = false