Class: Xberg::AnnotationKindCustom
- Inherits:
-
Data
- Object
- Data
- Xberg::AnnotationKindCustom
- Extended by:
- T::Sig
- Includes:
- AnnotationKind
- Defined in:
- lib/xberg/native.rb
Overview
Extensible annotation for format-specific styling.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
-
#value ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
- #bold? ⇒ Boolean
- #code? ⇒ Boolean
- #color? ⇒ Boolean
- #custom? ⇒ Boolean
- #font_size? ⇒ Boolean
- #highlight? ⇒ Boolean
- #italic? ⇒ Boolean
- #link? ⇒ Boolean
- #strikethrough? ⇒ Boolean
- #subscript? ⇒ Boolean
- #superscript? ⇒ Boolean
- #underline? ⇒ Boolean
Instance Attribute Details
#name ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
2440 2441 2442 |
# File 'lib/xberg/native.rb', line 2440 def name @name end |
#value ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
2440 2441 2442 |
# File 'lib/xberg/native.rb', line 2440 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
2479 2480 2481 |
# File 'lib/xberg/native.rb', line 2479 def self.from_hash(hash) new(name: hash[:name] || hash["name"], value: hash[:value] || hash["value"]) end |
Instance Method Details
#bold? ⇒ Boolean
2453 |
# File 'lib/xberg/native.rb', line 2453 def bold? = false |
#code? ⇒ Boolean
2461 |
# File 'lib/xberg/native.rb', line 2461 def code? = false |
#color? ⇒ Boolean
2471 |
# File 'lib/xberg/native.rb', line 2471 def color? = false |
#custom? ⇒ Boolean
2475 2476 2477 |
# File 'lib/xberg/native.rb', line 2475 def custom? = true # @param hash [Hash] deserialized from the native extension # @return [self] |
#font_size? ⇒ Boolean
2473 |
# File 'lib/xberg/native.rb', line 2473 def font_size? = false |
#highlight? ⇒ Boolean
2469 |
# File 'lib/xberg/native.rb', line 2469 def highlight? = false |
#italic? ⇒ Boolean
2455 |
# File 'lib/xberg/native.rb', line 2455 def italic? = false |
#link? ⇒ Boolean
2467 |
# File 'lib/xberg/native.rb', line 2467 def link? = false |
#strikethrough? ⇒ Boolean
2459 |
# File 'lib/xberg/native.rb', line 2459 def strikethrough? = false |
#subscript? ⇒ Boolean
2463 |
# File 'lib/xberg/native.rb', line 2463 def subscript? = false |
#superscript? ⇒ Boolean
2465 |
# File 'lib/xberg/native.rb', line 2465 def superscript? = false |
#underline? ⇒ Boolean
2457 |
# File 'lib/xberg/native.rb', line 2457 def underline? = false |