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



2779
2780
2781
# File 'lib/xberg/native.rb', line 2779

def name
  @name
end

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



2779
2780
2781
# File 'lib/xberg/native.rb', line 2779

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



2818
2819
2820
# File 'lib/xberg/native.rb', line 2818

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

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#color?Boolean

Returns:

  • (Boolean)


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

def color? = false

#custom?Boolean

Returns:

  • (Boolean)


2814
2815
2816
# File 'lib/xberg/native.rb', line 2814

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

#font_size?Boolean

Returns:

  • (Boolean)


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

def font_size? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


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

def link? = false

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false