Class: Xberg::DiffLineAdded

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
DiffLine
Defined in:
lib/xberg/native.rb

Overview

Line added in the "after" version.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



3903
3904
3905
# File 'lib/xberg/native.rb', line 3903

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



3920
3921
3922
# File 'lib/xberg/native.rb', line 3920

def self.from_hash(hash)
  new(value: hash[:_0] || hash["_0"])
end

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


3914
# File 'lib/xberg/native.rb', line 3914

def added? = true

#context?Boolean

Returns:

  • (Boolean)


3912
# File 'lib/xberg/native.rb', line 3912

def context? = false

#removed?Boolean

Returns:

  • (Boolean)


3916
3917
3918
# File 'lib/xberg/native.rb', line 3916

def removed? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]