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



4239
4240
4241
# File 'lib/xberg/native.rb', line 4239

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



4256
4257
4258
# File 'lib/xberg/native.rb', line 4256

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = false

#context?Boolean

Returns:

  • (Boolean)


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

def context? = true

#removed?Boolean

Returns:

  • (Boolean)


4252
4253
4254
# File 'lib/xberg/native.rb', line 4252

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