Class: Boxbot::Edge

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/boxbot/edge.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Edge

Returns a new instance of Edge.



14
15
16
# File 'lib/boxbot/edge.rb', line 14

def initialize(*args, &block)
  super(*args, &block)
end

Class Method Details

.dimension_index(dim) ⇒ Object



22
23
24
# File 'lib/boxbot/edge.rb', line 22

def self.dimension_index(dim)
  Types::Dimensions.values.find_index(dim)
end

Instance Method Details

#dimension_indexObject



18
19
20
# File 'lib/boxbot/edge.rb', line 18

def dimension_index
  self.class.dimension_index(dimension)
end