Class: ProsemirrorToHtml::Marks::Mark
- Inherits:
-
Object
- Object
- ProsemirrorToHtml::Marks::Mark
- Defined in:
- lib/prosemirror_to_html/marks/mark.rb
Class Attribute Summary collapse
-
.mark_type ⇒ Object
readonly
Returns the value of attribute mark_type.
-
.tag_name ⇒ Object
readonly
Returns the value of attribute tag_name.
Instance Method Summary collapse
-
#initialize(mark) ⇒ Mark
constructor
A new instance of Mark.
- #matching ⇒ Object
- #tag ⇒ Object
Constructor Details
#initialize(mark) ⇒ Mark
Returns a new instance of Mark.
11 12 13 |
# File 'lib/prosemirror_to_html/marks/mark.rb', line 11 def initialize(mark) @mark = mark end |
Class Attribute Details
.mark_type ⇒ Object (readonly)
Returns the value of attribute mark_type.
8 9 10 |
# File 'lib/prosemirror_to_html/marks/mark.rb', line 8 def mark_type @mark_type end |
.tag_name ⇒ Object (readonly)
Returns the value of attribute tag_name.
8 9 10 |
# File 'lib/prosemirror_to_html/marks/mark.rb', line 8 def tag_name @tag_name end |
Instance Method Details
#matching ⇒ Object
15 16 17 18 19 |
# File 'lib/prosemirror_to_html/marks/mark.rb', line 15 def matching return @mark.type == self.class.mark_type if @mark.type false end |
#tag ⇒ Object
21 22 23 |
# File 'lib/prosemirror_to_html/marks/mark.rb', line 21 def tag self.class.tag_name end |