class Eco::API::Common::People::PersonModifier
Constants
- EXTERNAL_PERSON
- INTERNAL_PERSON
- NO_ACCOUNT
- NO_DETAILS
- WITH_ACCOUNT
- WITH_DETAILS
Public Instance Methods
add_account?()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 24 def add_account? mode.any? { |m| WITH_ACCOUNT.include?(m) } end
add_details?()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 32 def add_details? mode.any? { |m| WITH_DETAILS.include?(m) } end
external?()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 45 def external? mode.any? { |m| EXTERNAL_PERSON.include?(m) } end
internal?()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 40 def internal? bool = mode.any? { |m| INTERNAL_PERSON.include?(m) } bool || !external? end
no_account?()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 28 def no_account? mode.any? { |m| NO_ACCOUNT.include?(m) } end
no_details()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 20 def no_details self.push(:no_details) end
no_details?()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 36 def no_details? mode.any? { |m| NO_DETAILS.include?(m) } end
reset_add_account()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 16 def reset_add_account self < self.mode - (WITH_ACCOUNT | NO_ACCOUNT) end
Protected Instance Methods
resolve_mode()
click to toggle source
# File lib/eco/api/common/people/person_modifier.rb, line 51 def resolve_mode modifiers = self.to_a modifiers = resolve(modifiers, WITH_DETAILS | NO_DETAILS) modifiers = resolve(modifiers, WITH_ACCOUNT | NO_ACCOUNT) modifiers = resolve(modifiers, INTERNAL_PERSON | EXTERNAL_PERSON) modifiers end