Sha256: 75a74d071950d2c62dcec489a42082531e76ad5cc6eff4d9139be461f6016ee2
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
module Extension module Models class Specification include SmartProperties module Features class Argo include SmartProperties property! :surface_area, converts: :to_str property! :renderer_package_name, converts: :to_str property! :git_template, converts: :to_str end def self.build(feature_set_attributes) feature_set_attributes.each_with_object(OpenStruct.new) do |(identifier, feature_attributes), feature_set| feature_set[identifier] = ShopifyCli::ResolveConstant .call(identifier, namespace: Features) .rescue { OpenStruct } .then { |c| c.new(**feature_attributes) } .unwrap { |error| raise error } end end end property! :identifier property :graphql_identifier, converts: :to_str property! :features, converts: Features.method(:build), default: -> { [] } def graphql_identifier super || identifier end end end end
Version data entries
3 entries across 3 versions & 1 rubygems