module RubyPocket

Constants

HttpError
RubyPocketError
VERSION
ValidationError

Attributes

environment[RW]

Public Class Methods

data_dir() click to toggle source
# File lib/ruby_pocket.rb, line 27
def data_dir
  @data_dir ||= File.join(home_dir, '.ruby_pocket')
end
environment=(environment) click to toggle source
# File lib/ruby_pocket.rb, line 11
def environment=(environment)
  @environment = Environment.new(environment)
end
setup_data_dir() click to toggle source
# File lib/ruby_pocket.rb, line 20
def setup_data_dir
  return unless environment.production?
  return if Dir.exist?(data_dir)

  Dir.mkdir data_dir
end

Private Class Methods

home_dir() click to toggle source
# File lib/ruby_pocket.rb, line 33
def home_dir
  Etc.getpwuid.dir
end