class AnyValue::ArrayOf
Public Class Methods
new(element)
click to toggle source
Calls superclass method
AnyValue::Anything::new
# File lib/any_value.rb, line 186 def initialize(element) unless element.is_a?(Anything) raise ArgumentError, "invalid argument: #{element.inspect}" end super @element = element end
Public Instance Methods
==(o)
click to toggle source
# File lib/any_value.rb, line 195 def ==(o) o.all? { |x| x == @element } end
inspect()
click to toggle source
# File lib/any_value.rb, line 199 def inspect "#<ArrayOf #{@element.inspect}>" end