Class: String
- Includes:
- JSSRubyExtensions::String::BackPorts, JSSRubyExtensions::String::Conversions, JSSRubyExtensions::String::Predicates, JamfRubyExtensions::String::BackPorts, JamfRubyExtensions::String::Conversions, JamfRubyExtensions::String::Predicates
- Defined in:
- lib/jss/ruby_extensions/string.rb,
lib/jss/compatibility.rb,
lib/jss/compatibility.rb,
lib/jamf/compatibility.rb,
lib/jamf/compatibility.rb,
lib/jamf/ruby_extensions/string.rb
Overview
include the modules loaded above
Instance Method Summary collapse
- #casecmp?(other) ⇒ Boolean
- #delete_prefix(pfx) ⇒ Object included from JamfRubyExtensions::String::BackPorts
- #delete_prefix!(pfx) ⇒ Object included from JamfRubyExtensions::String::BackPorts
- #delete_suffix(sfx) ⇒ Object included from JamfRubyExtensions::String::BackPorts
- #delete_suffix!(sfx) ⇒ Object included from JamfRubyExtensions::String::BackPorts
- #force_encoding(_args = nil) ⇒ Object
-
#j_float? ⇒ Boolean
included
from JamfRubyExtensions::String::Predicates
Is this string also a floar? (i.e. it consists only of numberic digits).
-
#j_integer? ⇒ Boolean
included
from JamfRubyExtensions::String::Predicates
Is this string also an integer? (i.e. it consists only of numberic digits, maybe with a dash in front).
-
#j_to_bool ⇒ Boolean?
included
from JamfRubyExtensions::String::Conversions
Convert the strings “true” and “false” (after stripping whitespace and downcasing) to TrueClass and FalseClass respectively.
-
#j_to_pathname ⇒ Pathname
included
from JamfRubyExtensions::String::Conversions
Convert a String to a Pathname object.
-
#j_to_timestamp ⇒ Time
included
from JamfRubyExtensions::String::Conversions
Convert a string to a Jamf::Timestamp object.
-
#jss_float? ⇒ Boolean
included
from JSSRubyExtensions::String::Predicates
Is this string also a floar? (i.e. it consists only of numberic digits).
-
#jss_integer? ⇒ Boolean
included
from JSSRubyExtensions::String::Predicates
Is this string also an integer? (i.e. it consists only of numberic digits, maybe with a dash in front).
-
#jss_to_bool ⇒ Boolean?
included
from JSSRubyExtensions::String::Conversions
Convert the strings “true” and “false” (after stripping whitespace and downcasing) to TrueClass and FalseClass respectively.
-
#jss_to_pathname ⇒ Pathname
included
from JSSRubyExtensions::String::Conversions
Convert a String to a Pathname object.
-
#jss_to_time ⇒ Time
included
from JSSRubyExtensions::String::Conversions
Convert a string to a Time object.
Instance Method Details
#casecmp?(other) ⇒ Boolean
81 82 83 84 85 |
# File 'lib/jss/compatibility.rb', line 81 def casecmp?(other) return nil unless other.is_a? String casecmp(other).zero? end |
#delete_prefix(pfx) ⇒ Object Originally defined in module JamfRubyExtensions::String::BackPorts
#delete_prefix!(pfx) ⇒ Object Originally defined in module JamfRubyExtensions::String::BackPorts
#delete_suffix(sfx) ⇒ Object Originally defined in module JamfRubyExtensions::String::BackPorts
#delete_suffix!(sfx) ⇒ Object Originally defined in module JamfRubyExtensions::String::BackPorts
#force_encoding(_args = nil) ⇒ Object
66 67 68 |
# File 'lib/jss/compatibility.rb', line 66 def force_encoding(_args = nil) self end |
#j_float? ⇒ Boolean Originally defined in module JamfRubyExtensions::String::Predicates
Is this string also a floar? (i.e. it consists only of numberic digits)
#j_integer? ⇒ Boolean Originally defined in module JamfRubyExtensions::String::Predicates
Is this string also an integer? (i.e. it consists only of numberic digits, maybe with a dash in front)
#j_to_bool ⇒ Boolean? Originally defined in module JamfRubyExtensions::String::Conversions
Convert the strings “true” and “false” (after stripping whitespace and downcasing) to TrueClass and FalseClass respectively
Return nil if any other string.
#j_to_pathname ⇒ Pathname Originally defined in module JamfRubyExtensions::String::Conversions
Convert a String to a Pathname object
#j_to_timestamp ⇒ Time Originally defined in module JamfRubyExtensions::String::Conversions
Convert a string to a Jamf::Timestamp object
#jss_float? ⇒ Boolean Originally defined in module JSSRubyExtensions::String::Predicates
Is this string also a floar? (i.e. it consists only of numberic digits)
#jss_integer? ⇒ Boolean Originally defined in module JSSRubyExtensions::String::Predicates
Is this string also an integer? (i.e. it consists only of numberic digits, maybe with a dash in front)
#jss_to_bool ⇒ Boolean? Originally defined in module JSSRubyExtensions::String::Conversions
Convert the strings “true” and “false” (after stripping whitespace and downcasing) to TrueClass and FalseClass respectively
Return nil if any other string.
#jss_to_pathname ⇒ Pathname Originally defined in module JSSRubyExtensions::String::Conversions
Convert a String to a Pathname object
#jss_to_time ⇒ Time Originally defined in module JSSRubyExtensions::String::Conversions
Convert a string to a Time object
returns nil if not parsable by JSS::parse_datetime