Completed
Push — master ( 001e31...14458d )
by Marcelo
01:22
created

Date.coerce()   A

Complexity

Conditions 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
1
module Koine
2
  module Attributes
3
    module Adapter
4
      class Date < Base
5
        def coerce(date)
6
          return date if date.instance_of?(::Date)
7
          ::Date.parse(date)
8
        end
9
      end
10
    end
11
  end
12
end
13