Class: MandateClaw::DSL::Party

Inherits:
Struct
  • Object
show all
Defined in:
lib/mandate_claw/dsl/party.rb

Constant Summary collapse

KINDS =
%i[human organisation autonomous].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#identifies_byObject

Returns the value of attribute identifies_by

Returns:

  • (Object)

    the current value of identifies_by



5
6
7
# File 'lib/mandate_claw/dsl/party.rb', line 5

def identifies_by
  @identifies_by
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



5
6
7
# File 'lib/mandate_claw/dsl/party.rb', line 5

def kind
  @kind
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/mandate_claw/dsl/party.rb', line 5

def name
  @name
end

Instance Method Details

#autonomous?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/mandate_claw/dsl/party.rb', line 8

def autonomous?
  kind == :autonomous
end

#valid?Boolean

Returns:

  • (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