Class: Parameters::Param

Inherits:
Object show all
Defined in:
lib/parameters/param.rb

Direct Known Subclasses

ClassParam, InstanceParam

Instance Attribute Summary

Instance Method Summary

Constructor Details

- (Param) initialize(name, description = nil)

Creates a new Param object.

Parameters:

  • (Symbol, String) name — The name of the parameter.
  • (String, nil) description (defaults to: nil) — The description of the parameter.


19
20
21
22
# File 'lib/parameters/param.rb', line 19

def initialize(name,description=nil)
  @name = name.to_sym
  @description = description
end

Instance Attribute Details

- (Object) description (readonly)

Description of parameter



8
9
10
# File 'lib/parameters/param.rb', line 8

def description
  @description
end

- (Object) name (readonly)

Name of parameter



5
6
7
# File 'lib/parameters/param.rb', line 5

def name
  @name
end