Class: Fragmentary::Handler
- Inherits:
-
Object
- Object
- Fragmentary::Handler
- Defined in:
- lib/fragmentary/handler.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**args) ⇒ Handler
constructor
A new instance of Handler.
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
#args ⇒ Object (readonly)
Returns the value of attribute args.
39 40 41 |
# File 'lib/fragmentary/handler.rb', line 39 def args @args end |
Class Method Details
.all ⇒ Object
25 26 27 |
# File 'lib/fragmentary/handler.rb', line 25 def self.all @@all end |
.clear ⇒ Object
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
#call ⇒ Object
45 46 47 |
# File 'lib/fragmentary/handler.rb', line 45 def call raise "Method 'call' not defined." end |