Class: Textus::Protocol::VerbRegistry::ArgSpec

Inherits:
Data
  • Object
show all
Defined in:
lib/textus/protocol/verb_registry/arg_spec.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cli_defaultObject (readonly)

Returns the value of attribute cli_default

Returns:

  • (Object)

    the current value of cli_default



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def cli_default
  @cli_default
end

#coerceObject (readonly)

Returns the value of attribute coerce

Returns:

  • (Object)

    the current value of coerce



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def coerce
  @coerce
end

#defaultObject (readonly)

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def default
  @default
end

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def name
  @name
end

#positionalObject (readonly)

Returns the value of attribute positional

Returns:

  • (Object)

    the current value of positional



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def positional
  @positional
end

#requiredObject (readonly)

Returns the value of attribute required

Returns:

  • (Object)

    the current value of required



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def required
  @required
end

#sourceObject (readonly)

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def source
  @source
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def type
  @type
end

#wire_nameObject (readonly)

Returns the value of attribute wire_name

Returns:

  • (Object)

    the current value of wire_name



4
5
6
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 4

def wire_name
  @wire_name
end

Class Method Details

.arg(name:, type: String, required: false, positional: false, description: nil, wire_name: nil, default: nil, source: nil, coerce: nil, cli_default: nil) ⇒ Object



10
11
12
13
14
15
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 10

def self.arg(name:, type: String, required: false, positional: false,
             description: nil, wire_name: nil,
             default: nil, source: nil, coerce: nil, cli_default: nil)
  new(name:, type:, required:, positional:,
      description:, wire_name:, default:, source:, coerce:, cli_default:)
end

Instance Method Details

#wireObject



8
# File 'lib/textus/protocol/verb_registry/arg_spec.rb', line 8

def wire = wire_name || name