Sha256: 86d1b2a44433aae8ffaf94605e9866eeab1780afa2d0430ea7004f5c6b43f651
Contents?: true
Size: 772 Bytes
Versions: 9
Compression:
Stored size: 772 Bytes
Contents
module Virtus class Attribute class DefaultValue # Represents default value evaluated via a callable object # # @api private class FromCallable < DefaultValue # Return if the class can handle the value # # @param [Object] value # # @return [Boolean] # # @api private def self.handle?(value) value.respond_to?(:call) end # Evaluates the value via value#call # # @param [Object] # # @return [Object] evaluated value # # @api private def call(*args) @value.call(*args) end end # class FromCallable end # class DefaultValue end # class Attribute end # module Virtus
Version data entries
9 entries across 9 versions & 2 rubygems