Method: Rodbot::Serializer#initialize
- Defined in:
- lib/rodbot/serializer.rb
permalink #initialize(object) ⇒ Serializer
Returns a new instance of Serializer.
25 26 27 28 29 30 31 |
# File 'lib/rodbot/serializer.rb', line 25 def initialize(object) case object when Hash then @hash = object when String then @string = object else fail ArgumentError, "must be either Hash or String" end end |