Module: AppdevSupport

Defined in:
lib/appdev_support.rb,
lib/appdev_support/version.rb

Defined Under Namespace

Classes: Error

Constant Summary collapse

VERSION =
"0.2.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.action_dispatchObject



9
10
11
# File 'lib/appdev_support.rb', line 9

def action_dispatch
  @action_dispatch || true
end

.active_recordObject



13
14
15
# File 'lib/appdev_support.rb', line 13

def active_record
  @active_record || true
end

.pryrcObject



17
18
19
# File 'lib/appdev_support.rb', line 17

def pryrc
  @pryrc || :minimal
end

Class Method Details

.config {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (AppdevSupport)

    the object that the method was called on



21
22
23
# File 'lib/appdev_support.rb', line 21

def config
  yield self
end

.initObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/appdev_support.rb', line 26

def self.init
  if @active_record
    load "appdev_support/active_record/delegation.rb"
    load "appdev_support/active_record/attribute_methods.rb"
    load "appdev_support/active_record/relation/to_s.rb"
  end
  if @action_dispatch
    load "appdev_support/action_dispatch/request/session/fetch.rb"
    load "appdev_support/action_dispatch/request/session/store.rb"
    load "appdev_support/action_dispatch/cookies/cookie_jar/fetch.rb"
    load "appdev_support/action_dispatch/cookies/cookie_jar/store.rb"
  end
  return unless Object.const_defined?("Pry")
  case @pryrc
  when :minimal, true
    load "appdev_support/pryrc/minimal.rb"
  when :debug
    load "appdev_support/pryrc/debug.rb"
  end
end