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



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

def name
  @name
end

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#color?Boolean

Returns:

  • (Boolean)


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

def color? = false

#custom?Boolean

Returns:

  • (Boolean)


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

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

#font_size?Boolean

Returns:

  • (Boolean)


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

def font_size? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


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

def link? = false

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false