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



4137
4138
4139
# File 'lib/xberg/native.rb', line 4137

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



4154
4155
4156
# File 'lib/xberg/native.rb', line 4154

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = false

#context?Boolean

Returns:

  • (Boolean)


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

def context? = true

#removed?Boolean

Returns:

  • (Boolean)


4150
4151
4152
# File 'lib/xberg/native.rb', line 4150

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