Class: String

Inherits:
Object show all
Includes:
JamfRubyExtensions::String::Conversions, JamfRubyExtensions::String::Predicates
Defined in:
lib/jamf/ruby_extensions/string.rb

Overview

include the modules loaded above

Instance Method Summary collapse

Instance Method Details

#j_float? ⇒ Boolean Also known as: jss_float? Originally defined in module JamfRubyExtensions::String::Predicates

Is this string also a floar? (i.e. it consists only of numberic digits)

Returns:

  • (Boolean)

#j_integer? ⇒ Boolean Also known as: jss_integer? 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)

Returns:

  • (Boolean)

#j_to_bool ⇒ Boolean? Also known as: jss_to_bool 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.

Returns:

  • (Boolean, nil) —

    the boolean value

#j_to_pathname ⇒ Pathname Also known as: jss_to_pathname Originally defined in module JamfRubyExtensions::String::Conversions

Convert a String to a Pathname object

Returns:

#j_to_time ⇒ Time Also known as: jss_to_time Originally defined in module JamfRubyExtensions::String::Conversions

Convert a string to a Time object

Returns:

  • (Time) —

    the time represented by the string, or nil

See Also:

  • Jamf.parse_time

#j_to_timestamp ⇒ Time Originally defined in module JamfRubyExtensions::String::Conversions

Convert a string to a Jamf::Timestamp object

Returns:

  • (Time) —

    the time represented by the string.