Class: Xberg::AnnotationKindCustom

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

Overview

Extensible annotation for format-specific styling.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



2432
2433
2434
# File 'lib/xberg/native.rb', line 2432

def name
  @name
end

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



2432
2433
2434
# File 'lib/xberg/native.rb', line 2432

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



2471
2472
2473
# File 'lib/xberg/native.rb', line 2471

def self.from_hash(hash)
  new(name: hash[:name] || hash["name"], value: hash[:value] || hash["value"])
end

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#color?Boolean

Returns:

  • (Boolean)


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

def color? = false

#custom?Boolean

Returns:

  • (Boolean)


2467
2468
2469
# File 'lib/xberg/native.rb', line 2467

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

#font_size?Boolean

Returns:

  • (Boolean)


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

def font_size? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


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

def link? = false

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false