Module: AttributeTypeMethods

Included in:
EasyJSONMatcher::NodeGenerator, EasyJSONMatcher::SchemaGenerator
Defined in:
lib/easy_json_matcher/attribute_type_methods.rb

Instance Method Summary collapse

Instance Method Details

#has_boolean(key:, opts: []) ⇒ Object



5
6
7
# File 'lib/easy_json_matcher/attribute_type_methods.rb', line 5

def has_boolean(key:, opts: [])
  has_attribute(key: key, opts: opts + [:boolean])
end

#has_date(key:, opts: []) ⇒ Object



13
14
15
# File 'lib/easy_json_matcher/attribute_type_methods.rb', line 13

def has_date(key:, opts: [])
  has_attribute(key: key, opts: opts + [:date])
end

#has_number(key:, opts: []) ⇒ Object



9
10
11
# File 'lib/easy_json_matcher/attribute_type_methods.rb', line 9

def has_number(key: , opts: [])
  has_attribute(key: key, opts: opts + [:number] )
end

#has_object(key:, opts: []) ⇒ Object



17
18
19
# File 'lib/easy_json_matcher/attribute_type_methods.rb', line 17

def has_object(key:, opts: [])
  has_attribute(key: key, opts: opts + [:object])
end

#has_string(key:, opts: []) ⇒ Object



25
26
27
# File 'lib/easy_json_matcher/attribute_type_methods.rb', line 25

def has_string(key:, opts: [])
  has_attribute(key: key, opts: opts + [:string])
end

#has_value(key:, opts: []) ⇒ Object



21
22
23
# File 'lib/easy_json_matcher/attribute_type_methods.rb', line 21

def has_value(key:, opts: [])
  has_attribute(key: key, opts: opts + [:value])
end