Class: Xberg::DiffLineAdded

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

Overview

Line added in the "after" version.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4234
4235
4236
# File 'lib/xberg/native.rb', line 4234

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added? = true

#context?Boolean

Returns:

  • (Boolean)


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

def context? = false

#removed?Boolean

Returns:

  • (Boolean)


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

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