Class: Qiita::Markdown::Filters::CustomBlock::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/qiita/markdown/filters/custom_block.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Metadata

Returns a new instance of Metadata.

Parameters:

  • text (String, nil)


21
22
23
24
# File 'lib/qiita/markdown/filters/custom_block.rb', line 21

def initialize(text)
  # Discared after the second word.
  @type, @subtype = text.split(" ")
end

Instance Attribute Details

#subtypeObject (readonly)

Returns the value of attribute subtype.



18
19
20
# File 'lib/qiita/markdown/filters/custom_block.rb', line 18

def subtype
  @subtype
end

#typeObject (readonly)

Returns the value of attribute type.



18
19
20
# File 'lib/qiita/markdown/filters/custom_block.rb', line 18

def type
  @type
end