Method: NameSPoolHash#method_missing

Defined in:
lib/tdl/exlib/itegration.rb

#method_missing(method_id, *arguments) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/tdl/exlib/itegration.rb', line 59

def method_missing(method_id, *arguments)
    m0 = method_id.match(/(?<name>.+)\s*=/)
    # m_self = method_id.match(/^self_(?<name>.+)/)
    # m1 = method_id.match(/(?<name>.+)\s*=/)
    # if m_self
    #     send("[]=",m_self[:name],m_self[:name])
    # elsif m0
    if m0
        # if has_key?(m0[:name])
        # old_assign(m0[:name],arguments[0])
        send("[]=",m0[:name],arguments[0])
    elsif  has_key?(method_id.to_s)
        send("[]",method_id)
    else
        raise TdlError.new("Itegration dont has name #{method_id} in names_pool")
    end
end