module AttributeTypeMethods

Public Instance Methods

boolean(key:, opts: [])
Alias for: has_boolean
date(key:, opts: [])
Alias for: has_date
has_boolean(key:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 4
def has_boolean(key:, opts: [])
  has_attribute(key: key, opts: opts + [:boolean])
end
Also aliased as: boolean
has_booleans(keys:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 32
def has_booleans(keys:, opts: [])
  mass_assign(keys: keys, opts: opts, meth: :has_boolean)
end
has_date(key:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 12
def has_date(key:, opts: [])
  has_attribute(key: key, opts: opts + [:date])
end
Also aliased as: date
has_dates(keys:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 48
def has_dates(keys:, opts: [])
  mass_assign(keys: keys, opts: opts, meth: :has_date)
end
has_number(key: , opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 8
def has_number(key: , opts: [])
  has_attribute(key: key, opts: opts + [:number] )
end
Also aliased as: number
has_numbers(keys:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 36
def has_numbers(keys:, opts: [])
  mass_assign(keys: keys, opts: opts, meth: :has_number)
end
has_object(key:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 16
def has_object(key:, opts: [])
  has_attribute(key: key, opts: opts + [:object])
end
Also aliased as: object
has_objects(keys:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 40
def has_objects(keys:, opts: [])
  mass_assign(keys: keys, opts: opts, meth: :has_object)
end
has_string(key:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 24
def has_string(key:, opts: [])
  has_attribute(key: key, opts: opts + [:string])
end
Also aliased as: string
has_strings(keys:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 28
def has_strings(keys:, opts: [])
  mass_assign(keys: keys, opts: opts, meth: :has_string)
end
has_value(key:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 20
def has_value(key:, opts: [])
  has_attribute(key: key, opts: opts + [:value])
end
Also aliased as: value
has_values(keys:, opts: []) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 44
def has_values(keys:, opts: [])
  mass_assign(keys: keys, opts: opts, meth: :has_value)
end
mass_assign(keys:, opts: [], meth:) click to toggle source
# File lib/easy_json_matcher/attribute_type_methods.rb, line 52
def mass_assign(keys:, opts: [], meth:)
  keys.each { |k| self.send(meth, { key: k, opts: opts }) }
end
number(key: , opts: [])
Alias for: has_number
object(key:, opts: [])
Alias for: has_object
string(key:, opts: [])
Alias for: has_string
value(key:, opts: [])
Alias for: has_value