Module Struct::ToHash

  1. lib/win32_service_manager/core_ext/struct_to_hash.rb
Struct ToHash dot/f_4.png

Methods

public instance

  1. hashable!
  2. hashable?

Included modules

  1. Ruby187
  2. RubyOld

Classes and Modules

Module Struct::ToHash::Ruby187
Module Struct::ToHash::RubyOld

Public instance methods

hashable! ()
[show source]
# File lib/win32_service_manager/core_ext/struct_to_hash.rb, line 29
    def hashable!
      raise ArgumentError, "#{self.inspect} has duplicate keys" unless hashable?
    end
hashable? ()
[show source]
# File lib/win32_service_manager/core_ext/struct_to_hash.rb, line 25
    def hashable?
      self.class.members.uniq == self.class.members
    end