Completed
Push — dev ( 73864e...ffd8f7 )
by Fike
38s
created

Any   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
dl 0
loc 15
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A hash() 0 3 1
A eql? 0 3 1
A to_s() 0 3 1
1
# frozen_string_literal: true
2
3
module AMA
4
  module Entity
5
    class Mapper
6
      class Type
7
        # Used as a wildcard to pass anything through
8
        class Any < Type
9
          INSTANCE = new
10
11
          def hash
12
            self.class.hash
13
          end
14
15
          def eql?(other)
16
            other.is_a?(Type)
17
          end
18
19
          def to_s
20
            'Any type placeholder'
21
          end
22
        end
23
      end
24
    end
25
  end
26
end
27