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)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



1051
1052
1053
# File 'lib/xberg/native.rb', line 1051

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



1067
1068
1069
# File 'lib/xberg/native.rb', line 1067

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = false

#context?Boolean

Returns:

  • (Boolean)


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

def context? = true

#removed?Boolean

Returns:

  • (Boolean)


1063
1064
1065
# File 'lib/xberg/native.rb', line 1063

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