2022-11-23 17:29:50 -06:00
|
|
|
class Method
|
|
|
|
def source(n=5)
|
|
|
|
loc = source_location
|
|
|
|
puts `sed -n "#{loc[1]},#{loc[1]+n}p;#{loc[1]+6}q" #{loc[0]}`
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
end
|
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
class Music
|
2022-08-06 15:39:29 -05:00
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def initialize(mpath = "")
|
|
|
|
load(mpath);
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
|
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def load(mpath)
|
|
|
|
#@music = load(path);
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def play
|
2022-08-06 15:39:29 -05:00
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
end
|
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
class Sound
|
|
|
|
def initialize(path = "")
|
|
|
|
load(path);
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def load(path)
|
|
|
|
#@sound =
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def play
|
|
|
|
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
end
|
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def checknewer
|
|
|
|
$maketimes ||= {}
|
|
|
|
file = caller[0].split(":")[0]
|
|
|
|
if $maketimes[file].nil?
|
|
|
|
$maketimes[file] = `stat --printf '%Y' #{file}`
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
newtime = `stat --printf '%Y' #{file}`
|
|
|
|
if newtime > $maketimes[file]
|
|
|
|
load(file)
|
|
|
|
end
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def set_renderms(val)
|
|
|
|
settings_cmd(0, val);
|
2022-08-06 15:39:29 -05:00
|
|
|
end
|
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def set_updatems(val)
|
|
|
|
settings_cmd(1, val);
|
|
|
|
end
|
2022-08-06 15:39:29 -05:00
|
|
|
|
2022-11-23 17:29:50 -06:00
|
|
|
def set_physms(val)
|
|
|
|
settings_cmd(2, val);
|
2022-08-06 15:39:29 -05:00
|
|
|
end
|