Class: HamlParser::Ast::SilentScript

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasChildren

#<<

Constructor Details

#initializeSilentScript

Returns a new instance of SilentScript.



93
94
95
96
97
98
# File 'lib/haml_parser/ast.rb', line 93

def initialize(*)
  super
  if mid_block_keyword.nil?
    self.mid_block_keyword = false
  end
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children



90
91
92
# File 'lib/haml_parser/ast.rb', line 90

def children
  @children
end

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



90
91
92
# File 'lib/haml_parser/ast.rb', line 90

def filename
  @filename
end

#linenoObject

Returns the value of attribute lineno

Returns:

  • (Object)

    the current value of lineno



90
91
92
# File 'lib/haml_parser/ast.rb', line 90

def lineno
  @lineno
end

#mid_block_keywordObject

Returns the value of attribute mid_block_keyword

Returns:

  • (Object)

    the current value of mid_block_keyword



90
91
92
# File 'lib/haml_parser/ast.rb', line 90

def mid_block_keyword
  @mid_block_keyword
end

#scriptObject

Returns the value of attribute script

Returns:

  • (Object)

    the current value of script



90
91
92
# File 'lib/haml_parser/ast.rb', line 90

def script
  @script
end

Instance Method Details

#to_hObject



100
101
102
# File 'lib/haml_parser/ast.rb', line 100

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