Class: Sashite::Cpn::Shape

Inherits:
Object
  • Object
show all
Defined in:
lib/sashite/cpn/shape.rb

Overview

Shape class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*indexes) ⇒ Shape

Returns a new instance of Shape.

Parameters:

  • indexes (Array)

    The list of indexes.



8
9
10
# File 'lib/sashite/cpn/shape.rb', line 8

def initialize(*indexes)
  @indexes = indexes
end

Instance Attribute Details

#indexesArray (readonly)

Returns The list of indexes.

Returns:

  • (Array)

    The list of indexes.



15
16
17
# File 'lib/sashite/cpn/shape.rb', line 15

def indexes
  @indexes
end

Instance Method Details

#to_sString

Returns A string representation.

Returns:

  • (String)

    A string representation.



18
19
20
# File 'lib/sashite/cpn/shape.rb', line 18

def to_s
  indexes.join(',')
end