lib/patch_ruby/models/project.rb in patch_ruby-1.5.1 vs lib/patch_ruby/models/project.rb in patch_ruby-1.5.2

- old
+ new

@@ -24,11 +24,11 @@ attr_accessor :name # The description of the project. attr_accessor :description - # The type of carbon removal project, currently available project types are Biomass, Dac, Forestry, Mineralization, Ocean, Soil. + # The type of carbon removal project, currently available project types are Biomass, Dac, Forestry, Mineralization, Ocean, Renewables, Soil. attr_accessor :type # The country of origin of the project. attr_accessor :country @@ -244,11 +244,11 @@ def valid? return false if @id.nil? return false if @production.nil? return false if @name.nil? return false if @description.nil? - type_validator = EnumAttributeValidator.new('String', ["biomass", "dac", "forestry", "mineralization", "ocean", "soil"]) + type_validator = EnumAttributeValidator.new('String', ["biomass", "dac", "forestry", "mineralization", "ocean", "renewables", "soil"]) return false unless type_validator.valid?(@type) return false if @country.nil? return false if @developer.nil? return false if @average_price_per_tonne_cents_usd.nil? return false if @remaining_mass_g.nil? @@ -256,10 +256,10 @@ end # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["biomass", "dac", "forestry", "mineralization", "ocean", "soil"]) + validator = EnumAttributeValidator.new('String', ["biomass", "dac", "forestry", "mineralization", "ocean", "renewables", "soil"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @type = type end