Class: Ruvi::LineSlice

Inherits:
Struct
  • Object
show all
Includes:
NewLineAttributes
Defined in:
lib/selections.rb,
lib/selections.rb

Instance Attribute Summary collapse

Attributes included from NewLineAttributes

#newline_at_end, #newline_at_start

Instance Method Summary collapse

Methods included from NewLineAttributes

#inspect

Instance Attribute Details

#x1Object

Returns the value of attribute x1

Returns:

  • (Object)

    the current value of x1



5
6
7
# File 'lib/selections.rb', line 5

def x1
  @x1
end

#x2Object

Returns the value of attribute x2

Returns:

  • (Object)

    the current value of x2



5
6
7
# File 'lib/selections.rb', line 5

def x2
  @x2
end

#yObject

Returns the value of attribute y

Returns:

  • (Object)

    the current value of y



5
6
7
# File 'lib/selections.rb', line 5

def y
  @y
end

Instance Method Details

#to_sObject



8
9
10
# File 'lib/selections.rb', line 8

def to_s
    "#{y}:#{x1}-#{x2}#{newline_at_start ? "S" : ""}#{newline_at_end ? "E" : ""}"
end