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.



19
20
21
# File 'lib/fragmentary/handler.rb', line 19

def initialize(args)
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



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

def args
  @args
end

Class Method Details

.allObject



3
4
5
# File 'lib/fragmentary/handler.rb', line 3

def self.all
  @@all
end

.clearObject



7
8
9
# File 'lib/fragmentary/handler.rb', line 7

def self.clear
  @@all = []
end

.create(args) ⇒ Object



12
13
14
15
# File 'lib/fragmentary/handler.rb', line 12

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

Instance Method Details

#callObject



23
24
25
# File 'lib/fragmentary/handler.rb', line 23

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