Class: HamdownCore::Ast::HtmlComment

Inherits:
Struct
  • Object
show all
Includes:
HasChildren
Defined in:
lib/hamdown_core/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasChildren

#<<

Constructor Details

#initializeHtmlComment

Returns a new instance of HtmlComment.



118
119
120
121
122
# File 'lib/hamdown_core/ast.rb', line 118

def initialize(*)
  super
  self.comment ||= ''
  self.conditional ||= ''
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children



115
116
117
# File 'lib/hamdown_core/ast.rb', line 115

def children
  @children
end

#commentObject

Returns the value of attribute comment

Returns:

  • (Object)

    the current value of comment



115
116
117
# File 'lib/hamdown_core/ast.rb', line 115

def comment
  @comment
end

#conditionalObject

Returns the value of attribute conditional

Returns:

  • (Object)

    the current value of conditional



115
116
117
# File 'lib/hamdown_core/ast.rb', line 115

def conditional
  @conditional
end

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



115
116
117
# File 'lib/hamdown_core/ast.rb', line 115

def filename
  @filename
end

#linenoObject

Returns the value of attribute lineno

Returns:

  • (Object)

    the current value of lineno



115
116
117
# File 'lib/hamdown_core/ast.rb', line 115

def lineno
  @lineno
end

Instance Method Details

#to_hObject



124
125
126
# File 'lib/hamdown_core/ast.rb', line 124

def to_h
  super.merge(type: 'html_comment')
end