Class: Regexp

Inherits:
Object show all
Defined in:
lib/gems/json_pure-1.1.3/lib/json/add/core.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.json_create(object) ⇒ Object



124
125
126
# File 'lib/gems/json_pure-1.1.3/lib/json/add/core.rb', line 124

def self.json_create(object)
  new(object['s'], object['o'])
end

Instance Method Details

#to_jsonObject



128
129
130
131
132
133
134
# File 'lib/gems/json_pure-1.1.3/lib/json/add/core.rb', line 128

def to_json(*)
  {
    'json_class' => self.class.name,
    'o' => options,
    's' => source,
  }.to_json
end