Class: Mahoujin::Atoms::Choice
- Inherits:
-
Object
- Object
- Mahoujin::Atoms::Choice
- Defined in:
- lib/mahoujin/atoms/choice.rb
Instance Attribute Summary collapse
-
#atoms ⇒ Object
readonly
Returns the value of attribute atoms.
Instance Method Summary collapse
-
#initialize(atoms) ⇒ Choice
constructor
A new instance of Choice.
Constructor Details
#initialize(atoms) ⇒ Choice
Returns a new instance of Choice.
6 7 8 9 |
# File 'lib/mahoujin/atoms/choice.rb', line 6 def initialize(atoms) raise if atoms.size < 2 @atoms = atoms.freeze end |
Instance Attribute Details
#atoms ⇒ Object (readonly)
Returns the value of attribute atoms.
4 5 6 |
# File 'lib/mahoujin/atoms/choice.rb', line 4 def atoms @atoms end |