module Transcriptic::Helpers

Public Instance Methods

json_decode(json) click to toggle source
# File lib/transcriptic/helpers.rb, line 18
def json_decode(json)
  Transcriptic::OkJson.decode(json)
rescue Transcriptic::OkJson::Error
  nil
end
json_encode(object) click to toggle source
# File lib/transcriptic/helpers.rb, line 12
def json_encode(object)
  Transcriptic::OkJson.encode(object)
rescue Transcriptic::OkJson::Error
  nil
end
running_on_a_mac?() click to toggle source
# File lib/transcriptic/helpers.rb, line 8
def running_on_a_mac?
  RUBY_PLATFORM =~ /-darwin\d/
end
running_on_windows?() click to toggle source
# File lib/transcriptic/helpers.rb, line 4
def running_on_windows?
  RUBY_PLATFORM =~ /mswin32|mingw32/
end