Class: Cyberweb::DownloadBalloonCss
- Inherits:
-
Base
- Object
- Base
- Cyberweb::DownloadBalloonCss
show all
- Defined in:
- lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb
Overview
Cyberweb::DownloadBalloonCss
Constant Summary
collapse
- REMOTE_URL =
#
REMOTE_URL
Specify the URL to the remote balloon.css file.
The URL to the repository is at:
https://github.com/kazzkiq/balloon.css
#
'https://raw.githubusercontent.com/kazzkiq/balloon.css/master/balloon.css'
Constants inherited
from Base
Base::HOME_DIRECTORY_OF_THE_USER_X, Base::NAMESPACE
Class Method Summary
collapse
-
.[](i = '') ⇒ Object
# === Cyberweb::DownloadBalloonCss[] ========================================================================= #.
Instance Method Summary
collapse
Methods inherited from Base
#be_verbose, #be_verbose?, #cascading_style_sheets_directory?, #cd, #commandline_mode?, #copyright?, #css_comment, #delete_directory, #do_toggle, #e, #echo_raw, #filename?, #full_path_to_image_directory?, #html_colours?, #html_image, #htmlentities, #img_dir?, #infer_the_namespace, #initialize_the_configuration, #is_a_file?, #is_a_video_file?, #is_an_image_file?, #is_on_roebe?, #last_tag_used?, #last_tag_used_first_element?, #last_tag_used_id?, #mkdir, #mode?, #namespace?, #open_in_browser, #opne, #remove_comments_from_this_string_but_preserve_CSS_rules, #remove_html, #return_all_directories, #return_date, #return_program_name, #return_pwd, #ruby_header?, #server_base_directory?, #set_commandline_mode, #set_last_tag_used, #update_the_image_directory, #use_this_relative_directory_for_custom_images?, #www_mode?
#copy_this_file, #cpr, #delete_file, #filename_without_extension?, #read_file_via_utf8_encoding
Methods included from BaseModule
#attach_these_constants, #base_dir?, #beautiful_url, #cd, #create_the_internal_hash, #doctype?, #ee, #ensure_main_encoding, #esystem, #html_templates, #initialize_the_config_if_the_config_hash_is_empty, #internal_hash?, #log_dir?, #no_http, #random_alphabet_characters, #rarrow?, #rds, #remove_comments_from_this_string, #remove_numbers, #require_the_html_templates, #require_these, #return_file_size_in_kb_of, #return_html_comment, #ruby_sitelib_dir?, #sanitize_this_id, #server_base_directory?, #string_remote_image, #today?, #try_to_require_rack, #try_to_require_the_open_gem, #write_what_into
#content_type_is_html, #content_type_is_jpeg, #content_type_is_json, #content_type_is_plain_text
#append_to_the_commandline_arguments, #commandline_arguments?, #first_argument?, #parse_these_commandline_arguments, #second_argument?, #set_commandline_arguments
#all_html_colours, #lightgreen, #rev, #sdir, #sfancy, #sfile, #simp, #steelblue, #tomato
Constructor Details
#initialize(i = nil, run_already = true) ⇒ DownloadBalloonCss
40
41
42
43
44
45
46
47
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 40
def initialize(
i = nil,
run_already = true
)
reset
set_input(i)
run if run_already
end
|
Class Method Details
.[](i = '') ⇒ Object
#
Cyberweb::DownloadBalloonCss[]
#
148
149
150
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 148
def self.[](i = '')
new(i)
end
|
Instance Method Details
#display_this_remote_url(i) ⇒ Object
#
display_this_remote_url
#
93
94
95
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 93
def display_this_remote_url(i)
e sfancy(" #{i}")
end
|
#do_download_the_remote_css_file(use_this_url = REMOTE_URL) ⇒ Object
#
do_download_the_remote_css_file
#
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 121
def do_download_the_remote_css_file(
use_this_url = REMOTE_URL
)
store_here = File.basename(use_this_url)
if File.exist? store_here
opnn; e "The data has been stored in the file `#{sfile(store_here)}`."
end
open(store_here, 'wb') { |file|
file << URI.open(use_this_url).read
}
end
|
69
70
71
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 69
def input?
@input
end
|
#notify_the_user_what_this_class_will_do ⇒ Object
#
notify_the_user_what_this_class_will_do
#
83
84
85
86
87
88
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 83
def notify_the_user_what_this_class_will_do
opnn; e 'This class will download the remote .css from:'
e
display_this_remote_url(REMOTE_URL)
e
end
|
76
77
78
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 76
def opnn
super(NAMESPACE)
end
|
52
53
54
55
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 52
def reset
super()
infer_the_namespace
end
|
139
140
141
142
143
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 139
def run
notify_the_user_what_this_class_will_do
do_download_the_remote_css_file
show_additional_information
end
|
60
61
62
63
64
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 60
def set_input(i = '')
i = i.first if i.is_a? Array
i = i.to_s.dup
@input = i
end
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# File 'lib/cyberweb/utility_scripts/download_balloon_css/download_balloon_css.rb', line 100
def show_additional_information
e
e 'For more information, have a look at:'
e
display_this_remote_url('https://kazzkiq.github.io/balloon.css/')
e
e 'As a short primer, possibly helpful code is shown next:'
e
e ' <button data-balloon="Whats up!" data-balloon-pos="up">Hover me!</button>'
e ' <button data-balloon="Whats up!" data-balloon-pos="left">Hover me!</button>'
e ' <button data-balloon="Whats up!" data-balloon-pos="right">Hover me!</button>'
e
e ' <button data-balloon-length="medium" data-balloon="Now that is a '\
'super big text we have over here right? Lorem ipsum dolor sit I am done." '\
'data-balloon-pos="up">I amm a medium tooltip.</button>'
e
end
|