Class: Curry::SpiceArg
- Inherits:
-
Object
- Object
- Curry::SpiceArg
- Defined in:
- lib/curry.rb
Overview
Just a base class for ‘active’ special spices (holes, really). SpiceArgs have a spice_arg method that must return an array. Maybe you can subclass up your own special spices…
All the standard subclasses are singletons, the instance of which is assigned to the appropriate constant (HOLE, BLACKHOLE, etc).
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(name) ⇒ SpiceArg
constructor
A new instance of SpiceArg.
- #inspect ⇒ Object
- #spice_arg(args_remain) ⇒ Object
Constructor Details
#initialize(name) ⇒ SpiceArg
Returns a new instance of SpiceArg.
68 69 70 |
# File 'lib/curry.rb', line 68 def initialize(name) @name = name end |
Instance Method Details
#inspect ⇒ Object
76 77 78 |
# File 'lib/curry.rb', line 76 def inspect "<#{@name}>" end |
#spice_arg(args_remain) ⇒ Object
72 73 74 |
# File 'lib/curry.rb', line 72 def spice_arg(args_remain) raise NoMethodError, "Abstract method" end |