aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/type')
-rw-r--r--activemodel/lib/active_model/type/big_integer.rb1
-rw-r--r--activemodel/lib/active_model/type/boolean.rb1
-rw-r--r--activemodel/lib/active_model/type/date.rb1
-rw-r--r--activemodel/lib/active_model/type/date_time.rb1
-rw-r--r--activemodel/lib/active_model/type/decimal.rb1
-rw-r--r--activemodel/lib/active_model/type/float.rb1
-rw-r--r--activemodel/lib/active_model/type/helpers/numeric.rb1
-rw-r--r--activemodel/lib/active_model/type/helpers/time_value.rb1
-rw-r--r--activemodel/lib/active_model/type/immutable_string.rb1
-rw-r--r--activemodel/lib/active_model/type/string.rb1
-rw-r--r--activemodel/lib/active_model/type/time.rb1
-rw-r--r--activemodel/lib/active_model/type/value.rb1
12 files changed, 0 insertions, 12 deletions
diff --git a/activemodel/lib/active_model/type/big_integer.rb b/activemodel/lib/active_model/type/big_integer.rb
index 89e43bcc5f..b2c3ee50aa 100644
--- a/activemodel/lib/active_model/type/big_integer.rb
+++ b/activemodel/lib/active_model/type/big_integer.rb
@@ -6,7 +6,6 @@ module ActiveModel
module Type
class BigInteger < Integer # :nodoc:
private
-
def max_value
::Float::INFINITY
end
diff --git a/activemodel/lib/active_model/type/boolean.rb b/activemodel/lib/active_model/type/boolean.rb
index e64d2c793c..1214e9319b 100644
--- a/activemodel/lib/active_model/type/boolean.rb
+++ b/activemodel/lib/active_model/type/boolean.rb
@@ -34,7 +34,6 @@ module ActiveModel
end
private
-
def cast_value(value)
if value == ""
nil
diff --git a/activemodel/lib/active_model/type/date.rb b/activemodel/lib/active_model/type/date.rb
index c5fe926039..0e96d2c8a4 100644
--- a/activemodel/lib/active_model/type/date.rb
+++ b/activemodel/lib/active_model/type/date.rb
@@ -15,7 +15,6 @@ module ActiveModel
end
private
-
def cast_value(value)
if value.is_a?(::String)
return if value.empty?
diff --git a/activemodel/lib/active_model/type/date_time.rb b/activemodel/lib/active_model/type/date_time.rb
index 133410e821..ba705be9b2 100644
--- a/activemodel/lib/active_model/type/date_time.rb
+++ b/activemodel/lib/active_model/type/date_time.rb
@@ -14,7 +14,6 @@ module ActiveModel
end
private
-
def cast_value(value)
return apply_seconds_precision(value) unless value.is_a?(::String)
return if value.empty?
diff --git a/activemodel/lib/active_model/type/decimal.rb b/activemodel/lib/active_model/type/decimal.rb
index e8ee18c00e..6aa51ff2ac 100644
--- a/activemodel/lib/active_model/type/decimal.rb
+++ b/activemodel/lib/active_model/type/decimal.rb
@@ -17,7 +17,6 @@ module ActiveModel
end
private
-
def cast_value(value)
casted_value = \
case value
diff --git a/activemodel/lib/active_model/type/float.rb b/activemodel/lib/active_model/type/float.rb
index ea1987df7c..36c7a5103c 100644
--- a/activemodel/lib/active_model/type/float.rb
+++ b/activemodel/lib/active_model/type/float.rb
@@ -19,7 +19,6 @@ module ActiveModel
end
private
-
def cast_value(value)
case value
when ::Float then value
diff --git a/activemodel/lib/active_model/type/helpers/numeric.rb b/activemodel/lib/active_model/type/helpers/numeric.rb
index 1d8171e25b..074316b559 100644
--- a/activemodel/lib/active_model/type/helpers/numeric.rb
+++ b/activemodel/lib/active_model/type/helpers/numeric.rb
@@ -24,7 +24,6 @@ module ActiveModel
end
private
-
def number_to_non_number?(old_value, new_value_before_type_cast)
old_value != nil && non_numeric_string?(new_value_before_type_cast.to_s)
end
diff --git a/activemodel/lib/active_model/type/helpers/time_value.rb b/activemodel/lib/active_model/type/helpers/time_value.rb
index dab196d653..508fe77531 100644
--- a/activemodel/lib/active_model/type/helpers/time_value.rb
+++ b/activemodel/lib/active_model/type/helpers/time_value.rb
@@ -44,7 +44,6 @@ module ActiveModel
end
private
-
def new_time(year, mon, mday, hour, min, sec, microsec, offset = nil)
# Treat 0000-00-00 00:00:00 as nil.
return if year.nil? || (year == 0 && mon == 0 && mday == 0)
diff --git a/activemodel/lib/active_model/type/immutable_string.rb b/activemodel/lib/active_model/type/immutable_string.rb
index 826bd7038f..18e12c54d1 100644
--- a/activemodel/lib/active_model/type/immutable_string.rb
+++ b/activemodel/lib/active_model/type/immutable_string.rb
@@ -17,7 +17,6 @@ module ActiveModel
end
private
-
def cast_value(value)
result = \
case value
diff --git a/activemodel/lib/active_model/type/string.rb b/activemodel/lib/active_model/type/string.rb
index a9c9bfadb6..0d9f4a63b4 100644
--- a/activemodel/lib/active_model/type/string.rb
+++ b/activemodel/lib/active_model/type/string.rb
@@ -12,7 +12,6 @@ module ActiveModel
end
private
-
def cast_value(value)
case value
when ::String then ::String.new(value)
diff --git a/activemodel/lib/active_model/type/time.rb b/activemodel/lib/active_model/type/time.rb
index 61847a4ce7..f230bd4257 100644
--- a/activemodel/lib/active_model/type/time.rb
+++ b/activemodel/lib/active_model/type/time.rb
@@ -29,7 +29,6 @@ module ActiveModel
end
private
-
def cast_value(value)
return apply_seconds_precision(value) unless value.is_a?(::String)
return if value.empty?
diff --git a/activemodel/lib/active_model/type/value.rb b/activemodel/lib/active_model/type/value.rb
index b6914dd63c..994d135b7b 100644
--- a/activemodel/lib/active_model/type/value.rb
+++ b/activemodel/lib/active_model/type/value.rb
@@ -114,7 +114,6 @@ module ActiveModel
end
private
-
# Convenience method for types which do not need separate type casting
# behavior for user and database inputs. Called by Value#cast for
# values except +nil+.