Class: Trino::Client::ModelVersions::V316::LongVariableConstraint=Base.new(:name,:expression)

Inherits:
Object
  • Object
show all
Defined in:
lib/trino/client/model_versions/316.rb

Class Method Summary collapse

Class Method Details

.decode(hash) ⇒ Object



1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
# File 'lib/trino/client/model_versions/316.rb', line 1167

def decode(hash)
  unless hash.is_a?(Hash)
    raise TypeError, "Can't convert #{hash.class} to Hash"
  end
  obj = allocate
  obj.send(:initialize_struct,
    hash["name"],
    hash["expression"],
  )
  obj
end