module AppStoreConnect::Object::Attributes

Public Instance Methods

attributes(&block) click to toggle source
# File lib/app_store_connect/object/attributes.rb, line 11
def attributes(&block)
  self::Attributes.class_eval(&block)
end
to_h() click to toggle source
# File lib/app_store_connect/object/attributes.rb, line 32
def to_h
  {}.tap do |hash|
    self.class.properties.keys.each do |name|
      value = instance_variable_get("@#{name}")

      hash[name] = value unless value.nil?
    end
  end
end