module Hatt::Mixin

Public Instance Methods

hatt_initialize() click to toggle source
# File lib/hatt/mixin.rb, line 13
def hatt_initialize
  hatt_build_client_methods
  load_hatts_using_configuration
  self
end
launch_pry_repl() click to toggle source
# File lib/hatt/mixin.rb, line 29
def launch_pry_repl
  require 'pry';binding.pry
end
run_script_file(filename) click to toggle source
# File lib/hatt/mixin.rb, line 19
def run_script_file(filename)
  info "Running data script '#{filename}'"
  raise(ArgumentError, "No such file '#{filename}'") unless File.exist? filename
  # by running in a anonymous class, we protect this class's namespace
  anon_class = BlankSlateProxy.new(self)
  with_local_load_path File.dirname(filename) do
    anon_class.instance_eval(IO.read(filename), filename, 1)
  end
end