Module: Solid::Value::ClassMethods

Defined in:
lib/solid/value.rb

Constant Summary collapse

UNDEFINED =
::Object.new

Instance Method Summary collapse

Instance Method Details

#attributeObject



13
14
15
# File 'lib/solid/value.rb', line 13

def attribute(...)
  super(:value, ...)
end

#new(value = UNDEFINED) ⇒ Object



7
8
9
10
11
# File 'lib/solid/value.rb', line 7

def new(value = UNDEFINED)
  return value if value.is_a?(self)

  UNDEFINED.equal?(value) ? super() : super(value: value)
end

#validatesObject



17
18
19
# File 'lib/solid/value.rb', line 17

def validates(...)
  super(:value, ...)
end