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)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



491
492
493
# File 'lib/xberg/native.rb', line 491

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



491
492
493
# File 'lib/xberg/native.rb', line 491

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



528
529
530
# File 'lib/xberg/native.rb', line 528

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

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#color?Boolean

Returns:

  • (Boolean)


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

def color? = false

#custom?Boolean

Returns:

  • (Boolean)


524
525
526
# File 'lib/xberg/native.rb', line 524

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

#font_size?Boolean

Returns:

  • (Boolean)


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

def font_size? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


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

def link? = false

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false