Class: Kungfuig::Prepender

Inherits:
Object
  • Object
show all
Defined in:
lib/kungfuig/prepender.rb

Defined Under Namespace

Classes: MalformedTarget

Constant Summary collapse

AGRESSIVE_ERRORS =
true

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, **params) ⇒ Prepender

Parameters might be: • 1

• 2



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/kungfuig/prepender.rb', line 47

def initialize *args, **params
  @

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



38
39
40
# File 'lib/kungfuig/prepender.rb', line 38

def method
  @method
end

#optionsObject (readonly)

Returns the value of attribute options.



38
39
40
# File 'lib/kungfuig/prepender.rb', line 38

def options
  @options
end

#receiverObject (readonly)

Returns the value of attribute receiver.



38
39
40
# File 'lib/kungfuig/prepender.rb', line 38

def receiver
  @receiver
end

#λObject (readonly)

Returns the value of attribute λ.



38
39
40
# File 'lib/kungfuig/prepender.rb', line 38

def 

Class Method Details

.anteponer(*args) ⇒ Object



32
33
34
35
# File 'lib/kungfuig/prepender.rb', line 32

def anteponer *args
  fail MalformedTarget.new "Factory requires a block; use Prepender#new for more accurate tuning", args unless block_given?
  Prepender.new(*args, &Proc.new)
end

.error!(e, **hash) ⇒ Object



28
29
30
# File 'lib/kungfuig/prepender.rb', line 28

def error! e, **hash
  errors << [e, hash]
end

.errorsObject



24
25
26
# File 'lib/kungfuig/prepender.rb', line 24

def errors
  @errors ||= []
end

Instance Method Details

#before(λ = nil) ⇒ Object Also known as: after, on_hook, on_error



76
77
78
79
# File 'lib/kungfuig/prepender.rb', line 76

def before