Class: PolybiusSquare::AlphaList
- Inherits:
-
Object
- Object
- PolybiusSquare::AlphaList
- Defined in:
- lib/alpha_list.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ AlphaList
constructor
A new instance of AlphaList.
Constructor Details
#initialize(options = {}) ⇒ AlphaList
Returns a new instance of AlphaList.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/alpha_list.rb', line 6 def initialize(={}) offset = [:offset] dropped = [:dropped] @list = %w[ a b c d e f g h i j k l m n o p q r s t u v w x y z ] @list.delete(dropped) if offset shifted = list.shift(offset) @list = list + shifted end end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
4 5 6 |
# File 'lib/alpha_list.rb', line 4 def list @list end |