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



3909
3910
3911
# File 'lib/xberg/native.rb', line 3909

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



3926
3927
3928
# File 'lib/xberg/native.rb', line 3926

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = true

#context?Boolean

Returns:

  • (Boolean)


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

def context? = false

#removed?Boolean

Returns:

  • (Boolean)


3922
3923
3924
# File 'lib/xberg/native.rb', line 3922

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