Class: Fragmentary::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/fragmentary/handler.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Handler

Returns a new instance of Handler.



41
42
43
# File 'lib/fragmentary/handler.rb', line 41

def initialize(**args)
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



39
40
41
# File 'lib/fragmentary/handler.rb', line 39

def args
  @args
end

Class Method Details

.allObject



25
26
27
# File 'lib/fragmentary/handler.rb', line 25

def self.all
  @@all
end

.clearObject



29
30
31
# File 'lib/fragmentary/handler.rb', line 29

def self.clear
  @@all = []
end

.create(**args) ⇒ Object



34
35
36
37
# File 'lib/fragmentary/handler.rb', line 34

def self.create(**args)
  @@all << (handler = self.new(args))
  handler
end

Instance Method Details

#callObject



45
46
47
# File 'lib/fragmentary/handler.rb', line 45

def call
  raise "Method 'call' not defined."
end