Module: Spektr::Exp::Assignment

Included in:
Const, Ivasign, Lvasign
Defined in:
lib/spektr/exp/assignment.rb

Instance Method Summary collapse

Instance Method Details

#user_input?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/spektr/exp/assignment.rb', line 4

def user_input?
  if ast.children[1].type == :send
    _send = Send.new(ast.children[1])
    name = if _send.receiver && _send.receiver.type == :send
      _send.receiver.name
    else
      nil
    end
    if [:params, :cookies, :request].include? name
      return true
    end
  end
  false
end