Class: Magnetic::Field::Set

Inherits:
Array show all
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

Methods inherited from Array

#delete_first

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