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



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



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

def children
  @children
end

#commentObject

Returns the value of attribute comment



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

def comment
  @comment
end

#conditionalObject

Returns the value of attribute conditional



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

def conditional
  @conditional
end

#filenameObject

Returns the value of attribute filename



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

def filename
  @filename
end

#linenoObject

Returns the value of attribute 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