Class: Msf::Util::DotNetDeserialization::Types::Primitives::EnumArray

Inherits:
BinData::Array
  • Object
show all
Defined in:
lib/msf/util/dot_net_deserialization/types/primitives.rb

Instance Method Summary collapse

Instance Method Details

#assign(values) ⇒ Object


60
61
62
63
64
65
66
67
# File 'lib/msf/util/dot_net_deserialization/types/primitives.rb', line 60

def assign(values)
  if values.is_a? ::Array
    enum = eval_parameter(:enum)
    values = values.map { |value| (value.is_a? Symbol) ? enum.fetch(value) : value }
  end

  super(values)
end