Class: Ncurses::WINDOW
Class Method Summary
collapse
Instance Method Summary
collapse
#destroyed?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/ncurses.rb', line 61
def method_missing(name, *args)
name = name.to_s
if (name[0,2] == "mv")
test_name = name.dup
test_name[2,0] = "w" if (Ncurses.respond_to?(test_name))
return Ncurses.send(test_name, self, *args)
end
end
test_name = "w" + name
if (Ncurses.respond_to?(test_name))
return Ncurses.send(test_name, self, *args)
end
Ncurses.send(name, self, *args)
end
|
Class Method Details
.new(*args) ⇒ Object
87
88
89
|
# File 'lib/ncurses.rb', line 87
def WINDOW.new(*args)
Ncurses.newwin(*args)
end
|
Instance Method Details
#del ⇒ Object
Also known as:
delete
83
84
85
|
# File 'lib/ncurses.rb', line 83
def del
Ncurses.delwin(self)
end
|
#respond_to?(name) ⇒ Boolean
76
77
78
79
80
81
82
|
# File 'lib/ncurses.rb', line 76
def respond_to?(name)
name = name.to_s
if (name[0,2] == "mv" && Ncurses.respond_to?("mvw" + name[2..-1]))
return true
end
Ncurses.respond_to?("w" + name) || Ncurses.respond_to?(name)
end
|