Module: OpenHAB::DSL::MonkeyPatch::Ruby::StringExtensions

Includes:
Core
Included in:
String
Defined in:
lib/openhab/dsl/monkey_patch/ruby/string.rb

Overview

Extend String class

Instance Method Summary collapse

Methods included from Core

wait_till_openhab_ready

Methods included from Log

included, logger, #logger, logger_for

Instance Method Details

#==(other) ⇒ Boolean

Compares String to another object

Parameters:

  • other (Object)

    object to compare to

Returns:

  • (Boolean)

    true if the two objects contain the same value, false otherwise



24
25
26
27
28
29
30
31
32
# File 'lib/openhab/dsl/monkey_patch/ruby/string.rb', line 24

def ==(other)
  case other
  when OpenHAB::DSL::Types::Quantity, QuantityType, Java::OrgOpenhabCoreLibraryTypes::StringType,
    OpenHAB::DSL::Types::DateTime, OpenHAB::DSL::Items::DateTimeItem
    other == self
  else
    super
  end
end