lib/spaceship/tunes/app_version.rb in spaceship-0.4.0 vs lib/spaceship/tunes/app_version.rb in spaceship-0.5.0
- old
+ new
@@ -159,11 +159,10 @@
class << self
# Create a new object based on a hash.
# This is used to create a new object based on the server response.
def factory(attrs)
- orig = attrs.dup
obj = self.new(attrs)
obj.unfold_languages
return obj
end
@@ -179,13 +178,15 @@
return self.factory(attrs)
end
end
# @return (Bool) Is that version currently available in the App Store?
+ # rubocop:disable Style/PredicateName
def is_live?
is_live
end
+ # rubocop:enable Style/PredicateName
# Call this method to make sure the given languages are available for this app
# You should call this method before accessing the name, description and other localized values
# This will create the new language if it's not available yet and do nothing if everything's there
# def create_languages!(languages)
@@ -262,11 +263,11 @@
def release_on_approval
super == 'true'
end
def supports_apple_watch
- (super != nil)
+ !super.nil?
end
def primary_category=(value)
value = "MZGenre.#{value}" unless value.include? "MZGenre"
super(value)
@@ -297,10 +298,10 @@
super(value)
end
private
- # generates the nested data structure to represent screenshots
+ # generates the nested data structure to represent screenshots
def setup_screenshots(row)
screenshots = row.fetch('screenshots', {}).fetch('value', nil)
return [] unless screenshots
result = []