Class: Canopus::Snippet::Occurrence

Inherits:
Data
  • Object
show all
Defined in:
lib/canopus/snippet.rb,
sig/snippet.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#index ⇒ Object (readonly)

Returns the value of attribute index

Returns:

  • (Object) —

    the current value of index



19
20
21
# File 'lib/canopus/snippet.rb', line 19

def index
  @index
end

#parents ⇒ Object (readonly)

Returns the value of attribute parents

Returns:

  • (Object) —

    the current value of parents



19
20
21
# File 'lib/canopus/snippet.rb', line 19

def parents
  @parents
end

#range ⇒ Object (readonly)

Returns the value of attribute range

Returns:

  • (Object) —

    the current value of range



19
20
21
# File 'lib/canopus/snippet.rb', line 19

def range
  @range
end

#transform ⇒ Object (readonly)

Returns the value of attribute transform

Returns:

  • (Object) —

    the current value of transform



19
20
21
# File 'lib/canopus/snippet.rb', line 19

def transform
  @transform
end

Class Method Details

.new ⇒ instance

Parameters:

  • index (Integer)
  • range (Range[Integer])
  • transform (Transform, nil)
  • parents (Array[Integer])

Returns:

  • (instance)


21
# File 'sig/snippet.rbs', line 21

def self.new: (Integer index, Range[Integer] range, Transform? transform, Array[Integer] parents) -> instance