Class: MCMarkdown::Parser::BlockTag::Block
- Inherits:
-
Object
- Object
- MCMarkdown::Parser::BlockTag::Block
- Defined in:
- lib/mc_markdown/parsers/block_tag.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#orig ⇒ Object
readonly
Returns the value of attribute orig.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content) ⇒ Block
constructor
A new instance of Block.
Constructor Details
#initialize(content) ⇒ Block
Returns a new instance of Block.
55 56 57 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 55 def initialize content @orig = content end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
53 54 55 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 53 def attributes @attributes end |
#orig ⇒ Object (readonly)
Returns the value of attribute orig.
51 52 53 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 51 def orig @orig end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
52 53 54 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 52 def type @type end |
Class Method Details
.close_block ⇒ Object
31 32 33 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 31 def close_block / (?:#{open_tag})? #{repeated_spaces} \{\{\/(.+?)\}\} (?:#{close_tag})? /x end |
.close_tag ⇒ Object
39 40 41 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 39 def close_tag / < (?:\/) (?:\w+?) > /x end |
.open_block ⇒ Object
27 28 29 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 27 def open_block / (?:#{open_tag})? \{\{(.+?)\}\} #{repeated_spaces} (?:#{close_tag})? /x end |
.open_tag ⇒ Object
35 36 37 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 35 def open_tag / < (?:\w+?) > /x end |
.pattern ⇒ Object
23 24 25 |
# File 'lib/mc_markdown/parsers/block_tag.rb', line 23 def pattern / #{open_block} (.*?) #{close_block} /xm end |