mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +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
|
||||
|
||||
def if_present(css_path)
|
||||
return unless frame.css(css_path).present?
|
||||
return if frame.css(css_path).blank?
|
||||
|
||||
frame.css(css_path).text
|
||||
end
|
||||
|
||||
def statuses_to_add
|
||||
statuses_frame = frame.css('add')
|
||||
return unless statuses_frame.present?
|
||||
return if statuses_frame.blank?
|
||||
|
||||
statuses_frame.css('status').map do |status|
|
||||
status['s']
|
||||
|
@ -50,7 +50,7 @@ module Deserializers
|
|||
|
||||
def statuses_to_remove
|
||||
statuses_frame = frame.css('rem')
|
||||
return unless statuses_frame.present?
|
||||
return if statuses_frame.blank?
|
||||
|
||||
statuses_frame.css('status').map do |status|
|
||||
status['s']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue