Module: Ruckus::StructureValidateField

Defined in:
lib/ruckus/structure/validate.rb

Instance Method Summary collapse

Instance Method Details

#structure_field_def_hook(*a) ⇒ Object



5
6
7
8
9
10
# File 'lib/ruckus/structure/validate.rb', line 5

def structure_field_def_hook(*a)
    args = a[0]
    if [ "value", "name", "size" ].include?(nm = args[0][:name] && args[0][:name].to_s) or (nm and nm.starts_with? "relate_")
        raise "can't have fields named #{ nm }, because we suck; rename the field"
    end
end