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
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
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)
Returns the value of attribute name
491 492 493 |
# File 'lib/xberg/native.rb', line 491 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute 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
502 |
# File 'lib/xberg/native.rb', line 502 def bold? = false |
#code? ⇒ Boolean
510 |
# File 'lib/xberg/native.rb', line 510 def code? = false |
#color? ⇒ Boolean
520 |
# File 'lib/xberg/native.rb', line 520 def color? = false |
#custom? ⇒ 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
522 |
# File 'lib/xberg/native.rb', line 522 def font_size? = false |
#highlight? ⇒ Boolean
518 |
# File 'lib/xberg/native.rb', line 518 def highlight? = false |
#italic? ⇒ Boolean
504 |
# File 'lib/xberg/native.rb', line 504 def italic? = false |
#link? ⇒ Boolean
516 |
# File 'lib/xberg/native.rb', line 516 def link? = false |
#strikethrough? ⇒ Boolean
508 |
# File 'lib/xberg/native.rb', line 508 def strikethrough? = false |
#subscript? ⇒ Boolean
512 |
# File 'lib/xberg/native.rb', line 512 def subscript? = false |
#superscript? ⇒ Boolean
514 |
# File 'lib/xberg/native.rb', line 514 def superscript? = false |
#underline? ⇒ Boolean
506 |
# File 'lib/xberg/native.rb', line 506 def underline? = false |