Class: HamlParser::Ast::Filter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFilter

Returns a new instance of Filter.



141
142
143
144
# File 'lib/haml_parser/ast.rb', line 141

def initialize(*)
  super
  self.texts ||= []
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



140
141
142
# File 'lib/haml_parser/ast.rb', line 140

def filename
  @filename
end

#linenoObject

Returns the value of attribute lineno

Returns:

  • (Object)

    the current value of lineno



140
141
142
# File 'lib/haml_parser/ast.rb', line 140

def lineno
  @lineno
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



140
141
142
# File 'lib/haml_parser/ast.rb', line 140

def name
  @name
end

#textsObject

Returns the value of attribute texts

Returns:

  • (Object)

    the current value of texts



140
141
142
# File 'lib/haml_parser/ast.rb', line 140

def texts
  @texts
end

Instance Method Details

#to_hObject



146
147
148
# File 'lib/haml_parser/ast.rb', line 146

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