Class: MandateClaw::DSL::Party
- Inherits:
-
Struct
- Object
- Struct
- MandateClaw::DSL::Party
- Defined in:
- lib/mandate_claw/dsl/party.rb
Constant Summary collapse
- KINDS =
%i[human organisation autonomous].freeze
Instance Attribute Summary collapse
-
#identifies_by ⇒ Object
Returns the value of attribute identifies_by.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#identifies_by ⇒ Object
Returns the value of attribute identifies_by
5 6 7 |
# File 'lib/mandate_claw/dsl/party.rb', line 5 def identifies_by @identifies_by end |
#kind ⇒ Object
Returns the value of attribute kind
5 6 7 |
# File 'lib/mandate_claw/dsl/party.rb', line 5 def kind @kind end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/mandate_claw/dsl/party.rb', line 5 def name @name end |
Instance Method Details
#autonomous? ⇒ Boolean
8 9 10 |
# File 'lib/mandate_claw/dsl/party.rb', line 8 def autonomous? kind == :autonomous end |
#valid? ⇒ Boolean
12 13 14 |
# File 'lib/mandate_claw/dsl/party.rb', line 12 def valid? KINDS.include?(kind) && name.is_a?(Symbol) && identifies_by.is_a?(Symbol) end |