lib/materialize/response.rb in materialize-0.4.3 vs lib/materialize/response.rb in materialize-0.4.4
- old
+ new
@@ -1,20 +1,22 @@
-class Response
+module Materialize
+ class Response
- attr_reader :message, :status, :options
+ attr_reader :message, :status, :options
- def initialize(options)
- @message = options['message']
- @status = options['status'].to_sym
- @options = options
- end
+ def initialize(options)
+ @message = options['message']
+ @status = options['status'].to_sym
+ @options = options
+ end
- def ok?
- status == :ok
- end
+ def ok?
+ status == :ok
+ end
- # This is used to look up ids -> e.g. patient_id, phase_id, etc.
- def method_missing(message)
- options.send(:[], message.to_s)
- end
+ # This is used to look up ids -> e.g. patient_id, phase_id, etc.
+ def method_missing(message)
+ options.send(:[], message.to_s)
+ end
+ end
end