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



3704
3705
3706
# File 'lib/xberg/native.rb', line 3704

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



3720
3721
3722
# File 'lib/xberg/native.rb', line 3720

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = false

#context?Boolean

Returns:

  • (Boolean)


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

def context? = true

#removed?Boolean

Returns:

  • (Boolean)


3716
3717
3718
# File 'lib/xberg/native.rb', line 3716

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