Class: Srx::Format::BaseFormat
- Inherits:
-
Object
- Object
- Srx::Format::BaseFormat
- Defined in:
- lib/srx/format/base_format.rb
Overview
Interface definition for format support
Instance Method Summary collapse
- #end_formatting?(markup) ⇒ Boolean abstract
-
#extract_markups(str) ⇒ Array(String,Array<Array(Integer,String)>)
abstract
Two items: 1) input
str
with markups removed, and 2) a list of markups, i.e. - #isolated_formatting?(markup) ⇒ Boolean abstract
- #start_formatting?(markup) ⇒ Boolean abstract
Instance Method Details
#end_formatting?(markup) ⇒ Boolean
This method is abstract.
26 27 28 |
# File 'lib/srx/format/base_format.rb', line 26 def end_formatting?(markup) raise(NotImplementedError) end |
#extract_markups(str) ⇒ Array(String,Array<Array(Integer,String)>)
This method is abstract.
Returns two items: 1) input str
with markups removed, and 2) a list of markups, i.e. [pos, string] pairs.
12 13 14 |
# File 'lib/srx/format/base_format.rb', line 12 def extract_markups(str) raise(NotImplementedError) end |
#isolated_formatting?(markup) ⇒ Boolean
This method is abstract.
33 34 35 |
# File 'lib/srx/format/base_format.rb', line 33 def isolated_formatting?(markup) raise(NotImplementedError) end |
#start_formatting?(markup) ⇒ Boolean
This method is abstract.
19 20 21 |
# File 'lib/srx/format/base_format.rb', line 19 def start_formatting?(markup) raise(NotImplementedError) end |