Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/plain_text/part.rb
Overview
Modifies Array
Direct Known Subclasses
Instance Method Summary collapse
-
#==(other) ⇒ Object
Equal operator modified to deal with PlainText::Part.
Instance Method Details
#==(other) ⇒ Object
Equal operator modified to deal with PlainText::Part
949 950 951 952 953 954 955 956 |
# File 'lib/plain_text/part.rb', line 949 def ==(other) return false if !other.class.method_defined?(:to_ary) i(parts boundaries).each do |ea_m| # %i(...) defined in Ruby 2.0 and later return equal_original_b4_part?(other) if !other.class.method_defined?(ea_m) return false if !self.class.method_defined?(ea_m) || (self.public_send(ea_m) != other.public_send(ea_m)) # public_send() defined in Ruby 2.0 (1.9?) and later end true end |