lib/checkoff/internal/selector_classes/common.rb in checkoff-0.109.0 vs lib/checkoff/internal/selector_classes/common.rb in checkoff-0.110.0
- old
+ new
@@ -103,11 +103,11 @@
# @param resource [Asana::Resources::Task,Asana::Resources::Project]
# @param custom_field_name [String]
# @return [String, nil]
def evaluate(resource, custom_field_name)
- custom_field = pull_custom_field_by_name(resource, custom_field_name)
+ custom_field = @custom_fields.resource_custom_field_by_name(resource, custom_field_name)
return nil if custom_field.nil?
custom_field['display_value']
end
end
@@ -125,11 +125,11 @@
# @sg-ignore
# @param resource [Asana::Resources::Task,Asana::Resources::Project]
# @param custom_field_gid [String]
# @return [String, nil]
def evaluate(resource, custom_field_gid)
- custom_field = pull_custom_field_or_raise(resource, custom_field_gid)
+ custom_field = @custom_fields.resource_custom_field_by_gid_or_raise(resource, custom_field_gid)
custom_field['display_value']
end
end
# :custom_field_gid_value_contains_any_gid function
@@ -147,11 +147,12 @@
# @param resource [Asana::Resources::Task,Asana::Resources::Project]
# @param custom_field_gid [String]
# @param custom_field_values_gids [Array<String>]
# @return [Boolean]
def evaluate(resource, custom_field_gid, custom_field_values_gids)
- actual_custom_field_values_gids = pull_custom_field_values_gids_or_raise(resource, custom_field_gid)
+ actual_custom_field_values_gids = @custom_fields.resource_custom_field_values_gids_or_raise(resource,
+ custom_field_gid)
actual_custom_field_values_gids.any? do |custom_field_value|
custom_field_values_gids.include?(custom_field_value)
end
end
@@ -172,11 +173,13 @@
# @param resource [Asana::Resources::Task,Asana::Resources::Project]
# @param custom_field_name [String]
# @param custom_field_value_names [Array<String>]
# @return [Boolean]
def evaluate(resource, custom_field_name, custom_field_value_names)
- actual_custom_field_values_names = pull_custom_field_values_names_by_name(resource, custom_field_name)
+ actual_custom_field_values_names =
+ @custom_fields.resource_custom_field_values_names_by_name(resource,
+ custom_field_name)
actual_custom_field_values_names.any? do |custom_field_value|
custom_field_value_names.include?(custom_field_value)
end
end
@@ -197,10 +200,12 @@
# @param resource [Asana::Resources::Task,Asana::Resources::Project]
# @param custom_field_gid [String]
# @param custom_field_values_gids [Array<String>]
# @return [Boolean]
def evaluate(resource, custom_field_gid, custom_field_values_gids)
- actual_custom_field_values_gids = pull_custom_field_values_gids_or_raise(resource, custom_field_gid)
+ actual_custom_field_values_gids =
+ @custom_fields.resource_custom_field_values_gids_or_raise(resource,
+ custom_field_gid)
custom_field_values_gids.all? do |custom_field_value|
actual_custom_field_values_gids.include?(custom_field_value)
end
end