Module: ConvertGlobalEnv
- Defined in:
- lib/convert_global_env/version/version.rb,
lib/convert_global_env/constants/constants.rb,
lib/convert_global_env/class/convert_global_env.rb,
lib/convert_global_env/toplevel_methods/toplevel_methods.rb
Overview
#
require 'convert_global_env/toplevel_methods/toplevel_methods.rb'
#
Defined Under Namespace
Classes: ConvertGlobalEnv
Constant Summary collapse
- VERSION =
#
ConvertGlobalEnv::VERSION
#
'1.1.4'
- ENCODING_ISO =
#
ENCODING_ISO
#
'ISO-8859-1'
- ENCODING_UTF =
#
ENCODING_UTF
#
'UTF-8'
- USE_THIS_ENCODING =
#
ConvertGlobalEnv::USE_THIS_ENCODING
This constant denotes the default encoding that is used for the ConvertGlobalEnv namespace.
#
ENCODING_UTF
- REGEX_TO_CHECK_FOR_GLOBAL_ENV =
#
REGEX_TO_CHECK_FOR_GLOBAL_ENV
The regex to check for the global env.
See:
https://rubular.com/r/6oyCjKnaOZd8rz
#
/\$\{?([A-Za-z_0-9]+)\}?/
Class Method Summary collapse
-
.[](i = ARGV) ⇒ Object
# === ConvertGlobalEnv[].
-
.e(i = '') ⇒ Object
# === ConvertGlobalEnv.e ========================================================================= #.
-
.encoding? ⇒ Boolean
# === ConvertGlobalEnv.encoding? ========================================================================= #.
-
.filename? ⇒ Boolean
# === ConvertGlobalEnv.filename? ========================================================================= #.
-
.new(i = ARGV) ⇒ Object
# === ConvertGlobalEnv.new.
Class Method Details
.[](i = ARGV) ⇒ Object
#
ConvertGlobalEnv[]
This variant must always return the result, as-is.
#
47 48 49 |
# File 'lib/convert_global_env/toplevel_methods/toplevel_methods.rb', line 47 def self.[](i = ARGV) ::ConvertGlobalEnv::ConvertGlobalEnv[i].result? end |
.e(i = '') ⇒ Object
#
ConvertGlobalEnv.e
#
29 30 31 |
# File 'lib/convert_global_env/toplevel_methods/toplevel_methods.rb', line 29 def self.e(i = '') puts i end |
.encoding? ⇒ Boolean
#
ConvertGlobalEnv.encoding?
#
22 23 24 |
# File 'lib/convert_global_env/toplevel_methods/toplevel_methods.rb', line 22 def self.encoding? @use_this_target_encoding end |
.filename? ⇒ Boolean
#
ConvertGlobalEnv.filename?
#
36 37 38 39 40 |
# File 'lib/convert_global_env/toplevel_methods/toplevel_methods.rb', line 36 def self.filename? _ = 'convert_global_env.rb' _ = sfancy(_) if Object.const_defined? :Colours return _ # This is the result. end |
.new(i = ARGV) ⇒ Object
#
ConvertGlobalEnv.new
This is different in that it must always return a new instance of the ConvertGlobalEnv class itself.
#
57 58 59 |
# File 'lib/convert_global_env/toplevel_methods/toplevel_methods.rb', line 57 def self.new(i = ARGV) ::ConvertGlobalEnv::ConvertGlobalEnv.new(i) end |