Module: Micro::Attributes::Features::Accept
- Defined in:
- lib/micro/attributes/features/accept.rb,
lib/micro/attributes/features/accept/strict.rb
Defined Under Namespace
Modules: Strict
Instance Method Summary collapse
- #accepted_attributes ⇒ Object
- #accepted_attributes? ⇒ Boolean
- #attributes_errors ⇒ Object
- #attributes_errors? ⇒ Boolean
- #rejected_attributes ⇒ Object
- #rejected_attributes? ⇒ Boolean
Instance Method Details
#accepted_attributes ⇒ Object
18 19 20 |
# File 'lib/micro/attributes/features/accept.rb', line 18 def accepted_attributes @__accepted_attributes ||= defined_attributes - rejected_attributes end |
#accepted_attributes? ⇒ Boolean
26 27 28 |
# File 'lib/micro/attributes/features/accept.rb', line 26 def accepted_attributes? !rejected_attributes? end |
#attributes_errors ⇒ Object
6 7 8 |
# File 'lib/micro/attributes/features/accept.rb', line 6 def attributes_errors @__attributes_errors end |
#attributes_errors? ⇒ Boolean
10 11 12 |
# File 'lib/micro/attributes/features/accept.rb', line 10 def attributes_errors? !@__attributes_errors.empty? end |
#rejected_attributes ⇒ Object
14 15 16 |
# File 'lib/micro/attributes/features/accept.rb', line 14 def rejected_attributes @__rejected_attributes ||= attributes_errors.keys end |
#rejected_attributes? ⇒ Boolean
22 23 24 |
# File 'lib/micro/attributes/features/accept.rb', line 22 def rejected_attributes? attributes_errors? end |