Class: Ohm::Types::Primitive
- Inherits:
-
BasicObject
- Defined in:
- lib/ohm/contrib/typecast.rb
Instance Method Summary
collapse
Constructor Details
#initialize(value) ⇒ Primitive
Returns a new instance of Primitive.
16
17
18
|
# File 'lib/ohm/contrib/typecast.rb', line 16
def initialize(value)
@raw = value
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object
37
38
39
|
# File 'lib/ohm/contrib/typecast.rb', line 37
def method_missing(meth, *args, &blk)
object.send(meth, *args, &blk)
end
|
Instance Method Details
#==(other) ⇒ Object
28
29
30
|
# File 'lib/ohm/contrib/typecast.rb', line 28
def ==(other)
to_s == other.to_s
end
|
#inspect ⇒ Object
24
25
26
|
# File 'lib/ohm/contrib/typecast.rb', line 24
def inspect
object
end
|
#to_s ⇒ Object
20
21
22
|
# File 'lib/ohm/contrib/typecast.rb', line 20
def to_s
@raw.to_s
end
|