Module: Solid::Value

Defined in:
lib/solid/value.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(subclass) ⇒ Object



22
23
24
25
26
# File 'lib/solid/value.rb', line 22

def self.included(subclass)
  subclass.include Solid::Model
  subclass.extend ClassMethods
  subclass.attribute
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



28
29
30
# File 'lib/solid/value.rb', line 28

def ==(other)
  other.is_a?(self.class) && other.value == value
end

#hashObject



32
33
34
# File 'lib/solid/value.rb', line 32

def hash
  value.hash
end

#to_sObject



36
37
38
# File 'lib/solid/value.rb', line 36

def to_s
  value.to_s
end