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.
19 20 21 |
# File 'lib/fragmentary/handler.rb', line 19 def initialize(args) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
17 18 19 |
# File 'lib/fragmentary/handler.rb', line 17 def args @args end |
Class Method Details
.all ⇒ Object
3 4 5 |
# File 'lib/fragmentary/handler.rb', line 3 def self.all @@all end |
.clear ⇒ Object
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
#call ⇒ Object
23 24 25 |
# File 'lib/fragmentary/handler.rb', line 23 def call raise "Method 'call' not defined." end |