class Estreet::VariableDeclaration

Public Class Methods

new(declarations) click to toggle source
# File lib/estreet/variable_declaration.rb, line 3
def initialize(declarations)
  raise TypeError unless declarations.all? {|d| d.is_a? VariableDeclarator}

  @declarations = declarations
end

Public Instance Methods

attributes() click to toggle source
Calls superclass method Estreet::Node#attributes
# File lib/estreet/variable_declaration.rb, line 9
def attributes
  super.merge(declarations: @declarations, kind: "var".freeze)
end
to_declaration() click to toggle source
# File lib/estreet/variable_declaration.rb, line 13
def to_declaration
  self
end