class ServiceOperation::Params::EnumerableOf

Matches an Enumerable with specific sub types @example EnumerableOf.new(String, Integer)

Attributes

element_type[R]

Public Class Methods

new(*args) click to toggle source
Calls superclass method ServiceOperation::Params::EnumType::new
# File lib/service_operation/params/types.rb, line 75
def initialize(*args)
  @element_type = args.length == 1 ? args.first : Any.new(args)

  super
end

Public Instance Methods

===(other) click to toggle source

@return [Boolean]

# File lib/service_operation/params/types.rb, line 82
def ===(other)
  type === other && other.all? { |element| element_type === element }
end
name() click to toggle source
# File lib/service_operation/params/types.rb, line 86
def name
  "#{super}Of(#{element_type.name})"
end
type() click to toggle source
# File lib/service_operation/params/types.rb, line 90
def type
  Enumerable
end