Class: Kintone::Type::Record

Inherits:
Hash show all
Defined in:
lib/kintone/type/record.rb

Instance Method Summary collapse

Constructor Details

#initialize(default = nil) ⇒ Record

Returns a new instance of Record.



3
4
5
# File 'lib/kintone/type/record.rb', line 3

def initialize(default = nil)
  default.each { |k, v| store(k, v) } if default.is_a?(Hash)
end

Instance Method Details

#to_kintoneObject



7
8
9
# File 'lib/kintone/type/record.rb', line 7

def to_kintone
  map { |k, v| [k, { value: v }] }.to_h
end