Class: Object

Inherits:
BasicObject
Defined in:
lib/toml/monkey_patch.rb

Overview

Adds to_toml methods to base Ruby classes used by the generator.

Instance Method Summary collapse

Instance Method Details

#toml_table?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/toml/monkey_patch.rb', line 3

def toml_table?
  self.kind_of?(Hash)
end

#toml_table_array?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/toml/monkey_patch.rb', line 6

def toml_table_array?
  self.kind_of?(Array) && self.first.toml_table?
end