Sha256: 7a4a16db23148145cde7efd747bc330e25b6403566a7c2f6dceb15a23de2694d
Contents?: true
Size: 520 Bytes
Versions: 1
Compression:
Stored size: 520 Bytes
Contents
module RailsConnector class ObjDataFromHash < ObjData def initialize(hash, type_hash = {}) @hash = hash.stringify_keys @type_hash = type_hash.stringify_keys end def value_and_type_of(attribute_name) [@hash[attribute_name], @type_hash[attribute_name]] end def has_custom_attribute?(name) @hash.has_key?(name) end def all_custom_attributes @hash.select do |attribute_name, _| has_custom_attribute?(attribute_name) end.keys end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
infopark_cloud_connector-7.1.0 | lib/rails_connector/obj_data_from_hash.rb |