Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/fidius-common/json_symbol_addon.rb

Overview

Part of the JSON Symbol Addon.

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ String

Encodes symbols as String, prefixed with “:”.

Parameters:

  • options (Hash) (defaults to: nil)

    Ingnored.

Returns:

  • (String)

    The converted Symbol.



14
15
16
# File 'lib/fidius-common/json_symbol_addon.rb', line 14

def as_json(options = nil)
  ":" + to_s
end