flant/superhosting

View on GitHub
lib/superhosting/helpers.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Superhosting
  module Helpers
    include Helper::Logger
    include Helper::File
    include Helper::Cmd
    include Helper::Config
    include Helper::Mapper

    def instance_variables_to_hash(obj)
      obj.instance_variables.map do |name|
        [name.to_s[1..-1].to_sym, obj.instance_variable_get(name)]
      end.to_h
    end
  end
end