Class: Boxbot::Edge
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Boxbot::Edge
- Defined in:
- lib/boxbot/edge.rb
Class Method Summary collapse
Instance Method Summary collapse
- #dimension_index ⇒ Object
-
#initialize(*args, &block) ⇒ Edge
constructor
A new instance of Edge.
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_index ⇒ Object
18 19 20 |
# File 'lib/boxbot/edge.rb', line 18 def dimension_index self.class.dimension_index(dimension) end |