Class: Hermeneutics::Count
- Inherits:
-
Object
- Object
- Hermeneutics::Count
- Defined in:
- lib/hermeneutics/types.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(num) ⇒ Count
constructor
A new instance of Count.
- #method_missing(sym, *args, **kwargs, &block) ⇒ Object
Constructor Details
#initialize(num) ⇒ Count
Returns a new instance of Count.
127 128 129 |
# File 'lib/hermeneutics/types.rb', line 127 def initialize num @i = num.to_i end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, **kwargs, &block) ⇒ Object
130 131 132 |
# File 'lib/hermeneutics/types.rb', line 130 def method_missing sym, *args, **kwargs, &block @i.send sym, *args, **kwargs, &block end |
Class Method Details
.parse(str) ⇒ Object
122 123 124 125 |
# File 'lib/hermeneutics/types.rb', line 122 def parse str i = Integer str new i end |