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



4261
4262
4263
# File 'lib/xberg/native.rb', line 4261

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



4278
4279
4280
# File 'lib/xberg/native.rb', line 4278

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = true

#context?Boolean

Returns:

  • (Boolean)


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

def context? = false

#removed?Boolean

Returns:

  • (Boolean)


4274
4275
4276
# File 'lib/xberg/native.rb', line 4274

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