Class: Automerge::Scalar

Inherits:
Object
  • Object
show all
Defined in:
lib/automerge.rb

Direct Known Subclasses

Bytes, Counter, Text, Timestamp, Uint

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Scalar

Returns a new instance of Scalar.



11
12
13
# File 'lib/automerge.rb', line 11

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



9
10
11
# File 'lib/automerge.rb', line 9

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'lib/automerge.rb', line 15

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