module Ncurses::Namespace
Some users like to include ncurses names despite namespace pollution This module is for them
Public Class Methods
append_features(target)
click to toggle source
# File lib/ncurses_sugar.rb, line 316 def self.append_features(target) # include constants unless target.ancestors.member?(Ncurses) target.__send__(:include, Ncurses) end # make methods available unless target.respond_to?(:pre_Ncurses_method_missing) target.module_eval{ alias pre_Ncurses_method_missing method_missing def method_missing(name, *args, &block) if Ncurses.respond_to?(name) Ncurses.send(name, *args, &block) else pre_Ncurses_method_missing(name, *args, &block) end end } end end
entend_object(object)
click to toggle source
# File lib/ncurses_sugar.rb, line 336 def self.entend_object(object) class << object self end.__send__(:include, self) end
Public Instance Methods
method_missing(name, *args, &block)
click to toggle source
# File lib/ncurses_sugar.rb, line 326 def method_missing(name, *args, &block) if Ncurses.respond_to?(name) Ncurses.send(name, *args, &block) else pre_Ncurses_method_missing(name, *args, &block) end end