Class: Magnetic::Field::Set
- Includes:
- Fieldable
- Defined in:
- lib/magnetic/field.rb
Overview
TODO try not to use array fields here
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*a, &b) ⇒ Set
constructor
A new instance of Set.
Methods inherited from Array
Constructor Details
#initialize(*a, &b) ⇒ Set
Returns a new instance of Set.
152 153 154 155 156 |
# File 'lib/magnetic/field.rb', line 152 def initialize *a, &b super ensure self.fields = [] end |
Class Method Details
.[](*a, &b) ⇒ Object
146 147 148 149 150 |
# File 'lib/magnetic/field.rb', line 146 def [] *a, &b a = super ensure a.fields = [] end |