Class: WeaselDiesel::Documentation::NamespacedParam

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

Overview

Namespaced param documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NamespacedParam

Returns a new instance of NamespacedParam.



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



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



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)


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

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