Module: Superhosting::Helpers

Instance Method Summary collapse

Methods included from Superhosting::Helper::Config

#_config, #_config_options, #_save_registry!, #apply, #configure, #configure_with_apply, #reconfig, #unapply, #unconfigure, #unconfigure_with_unapply

Methods included from Superhosting::Helper::Cmd

#_command, #_command_without_debug, #command, #command!

Methods included from Superhosting::Helper::File

#chmod!, #chown!, #chown_r!, #safe_link!, #safe_unlink!

Methods included from Superhosting::Helper::Logger

#__debug, #__dry_run, #__dry_run=, #__logger, #__logger=, #debug, #debug_block, #debug_operation, #indent, #indent=, #indent_reset, #indent_step, #indent_step_back, #info, #storage, #t, #with_dry_run, #with_indent, #with_logger

Instance Method Details

#instance_variables_to_hash(obj) ⇒ Object



8
9
10
11
12
# File 'lib/superhosting/helpers.rb', line 8

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