Class: GamesAndRpgParadise::MUD::UserFeedback
- Inherits:
-
Base
- Object
- Base
- GamesAndRpgParadise::MUD::UserFeedback
show all
- Defined in:
- lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb
Overview
GamesAndRpgParadise::MUD::UserFeedback
Constant Summary
Base::Extensions::Colours::ARRAY_AVAILABLE_KONSOLE_COLOURS
CommonExtensions::CONTROL_C_CODE, CommonExtensions::N
Class Method Summary
collapse
-
.[](i = '') ⇒ Object
# === GamesAndRpgParadise::MUD::UserFeedback[] ========================================================================= #.
Instance Method Summary
collapse
ecomment, #efancy, #eparse, #forestgreen, #gold, #grey, #lightblue, #mediumseagreen, #mediumslateblue, #peru, #rev, sdir, sfancy, #sfile, simp, #teal, #yellow
#commandline_arguments?, #filter_away_commandline_arguments, #first_argument?, #first_non_hyphened_argument?, #set_commandline_arguments
#cat, #cd, #cliner, #copy_file, #delete, #dirname_but_retains_the_trailing_slash, #disable_colours, #ensure_that_the_log_directory_exists, #esystem, #get_user_input, #infer_the_namespace, #is_on_roebe?, #log_dir?, #mkdir, #mkdir_then_cd_into_it, #mv, #namespace?, #opne, #opnn, #project_base_directory?, #project_image_directory?, #project_yaml_directory?, #rds, #register_sigint, #remove_this_directory, #rename_file, #reset_the_internal_hash, #return_pwd, #return_today, #touch_file, #wrap, #write_what_into
Constructor Details
#initialize(commandline_arguments = nil, run_already = true) ⇒ UserFeedback
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb', line 28
def initialize(
commandline_arguments = nil,
run_already = true
)
reset
set_commandline_arguments(
commandline_arguments
)
run if run_already
end
|
Class Method Details
.[](i = '') ⇒ Object
#
GamesAndRpgParadise::MUD::UserFeedback[]
#
93
94
95
|
# File 'lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb', line 93
def self.[](i = '')
new(i)
end
|
Instance Method Details
60
61
62
63
64
65
66
67
68
|
# File 'lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb', line 60
def obtain_user_input
@user_input = ''.dup
loop {
@user_input << $stdin.gets
break if @user_input.include? '___'
}
@user_input.sub!(/___/,'')
@user_input.strip!
end
|
#reset ⇒ Object
42
43
44
45
|
# File 'lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb', line 42
def reset
super()
infer_the_namespace
end
|
#run ⇒ Object
84
85
86
87
88
|
# File 'lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb', line 84
def run
show_helpful_information_to_the_user
obtain_user_input
store_the_user_input_into_a_yaml_file
end
|
73
74
75
76
77
78
79
|
# File 'lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb', line 73
def show_helpful_information_to_the_user
e 'You can now provide some feedback, via text.'
e
e 'Please input your text next (you can exit by '\
'typing ___ aka three _):'
e
end
|
50
51
52
53
54
55
|
# File 'lib/games_and_rpg_paradise/mud/user_feedback/user_feedback.rb', line 50
def store_the_user_input_into_a_yaml_file
what = @user_input
into = 'user_input.yml'
e 'Storing into '+sfile(into)+'.'
write_what_into(what, into)
end
|