Class: WSDSL::Documentation::NamespacedParam

Inherits:
Object
  • Object
show all
Defined in:
lib/documentation.rb

Overview

Namespaced param documentation

Since:

  • 0.0.3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NamespacedParam

Returns a new instance of NamespacedParam.

Since:

  • 0.0.3



62
63
64
65
# File 'lib/documentation.rb', line 62

def initialize(name)
  @name   = name
  @params = {}
end

Instance Attribute Details

#nameString, Symbol (readonly)

Returns The name of the namespaced, usually a symbol.

Returns:

  • (String, Symbol)

    The name of the namespaced, usually a symbol

Since:

  • 0.0.3



55
56
57
# File 'lib/documentation.rb', line 55

def name
  @name
end

#paramsHash (readonly)

Returns The list of params within the namespace.

Returns:

  • (Hash)

    The list of params within the namespace

Since:

  • 0.0.3



59
60
61
# File 'lib/documentation.rb', line 59

def params
  @params
end

Instance Method Details

#param(name, desc) ⇒ String

Sets the description/documentation of a specific namespaced param

Returns:

  • (String)

Since:

  • 0.0.3



71
72
73
# File 'lib/documentation.rb', line 71

def param(name, desc)
  @params[name] = desc
end