Class: Xberg::DiffLineContext

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

Overview

Unchanged context line.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4212
4213
4214
# File 'lib/xberg/native.rb', line 4212

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



4229
4230
4231
# File 'lib/xberg/native.rb', line 4229

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = false

#context?Boolean

Returns:

  • (Boolean)


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

def context? = true

#removed?Boolean

Returns:

  • (Boolean)


4225
4226
4227
# File 'lib/xberg/native.rb', line 4225

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