class TheCaptain::Response::CaptainVessel::CaptainObjectParser

Public Instance Methods

array_append(array, value) click to toggle source

OJ callback when an Array is being appended to.

# File lib/the_captain/response/captain_vessel.rb, line 54
def array_append(array, value)
  array << value.freeze
end
array_start() click to toggle source

OJ callback when an Array is initialized.

# File lib/the_captain/response/captain_vessel.rb, line 49
def array_start
  []
end
hash_key(key) click to toggle source

OJ callback when a Hash's key requires transformation.

# File lib/the_captain/response/captain_vessel.rb, line 39
def hash_key(key)
  key.downcase
end
hash_set(hash, key, value) click to toggle source

OJ callback when a hash is setting a new key value.

# File lib/the_captain/response/captain_vessel.rb, line 44
def hash_set(hash, key, value)
  hash[key] = value.freeze
end
hash_start() click to toggle source

OJ callback when a hash is initialized.

# File lib/the_captain/response/captain_vessel.rb, line 34
def hash_start
  CaptainObject.new
end