class OpenStruct
Public Instance Methods
attributes()
click to toggle source
# File lib/lite/ruby/open_struct.rb, line 7 def attributes @table end
replace(args)
click to toggle source
# File lib/lite/ruby/open_struct.rb, line 11 def replace(args) args.each { |key, val| self[key] = val } end
to_hash(table: true)
click to toggle source
# File lib/lite/ruby/open_struct.rb, line 15 def to_hash(table: true) return attributes unless table { table: attributes } end
Also aliased as: to_h
to_json(table: true)
click to toggle source
# File lib/lite/ruby/open_struct.rb, line 21 def to_json(table: true) to_hash(table: table).to_json end
Also aliased as: as_json