mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Reverse conditionals
This commit is contained in:
parent
82a9565c10
commit
8b7f4b2558
1 changed files with 3 additions and 3 deletions
|
@ -34,14 +34,14 @@ module Deserializers
|
||||||
end
|
end
|
||||||
|
|
||||||
def if_present(css_path)
|
def if_present(css_path)
|
||||||
return unless frame.css(css_path).present?
|
return if frame.css(css_path).blank?
|
||||||
|
|
||||||
frame.css(css_path).text
|
frame.css(css_path).text
|
||||||
end
|
end
|
||||||
|
|
||||||
def statuses_to_add
|
def statuses_to_add
|
||||||
statuses_frame = frame.css('add')
|
statuses_frame = frame.css('add')
|
||||||
return unless statuses_frame.present?
|
return if statuses_frame.blank?
|
||||||
|
|
||||||
statuses_frame.css('status').map do |status|
|
statuses_frame.css('status').map do |status|
|
||||||
status['s']
|
status['s']
|
||||||
|
@ -50,7 +50,7 @@ module Deserializers
|
||||||
|
|
||||||
def statuses_to_remove
|
def statuses_to_remove
|
||||||
statuses_frame = frame.css('rem')
|
statuses_frame = frame.css('rem')
|
||||||
return unless statuses_frame.present?
|
return if statuses_frame.blank?
|
||||||
|
|
||||||
statuses_frame.css('status').map do |status|
|
statuses_frame.css('status').map do |status|
|
||||||
status['s']
|
status['s']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue