Class: OptionalParam

Inherits:
OpenShift::Model
  • Object
show all
Defined in:
app/models/optional_param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, type = nil, description = nil, valid_options = nil, default_value = nil) ⇒ OptionalParam

Returns a new instance of OptionalParam.



4
5
6
7
8
9
10
11
# File 'app/models/optional_param.rb', line 4

def initialize(name=nil, type=nil, description=nil, valid_options=nil, default_value=nil)
  self.name = name
  self.type = type
  self.description = description
  valid_options = [valid_options] unless valid_options.kind_of?(Array)
  self.valid_options = valid_options || Array.new
  self.default_value = default_value
end

Instance Attribute Details

#default_valueObject

Returns the value of attribute default_value.



2
3
4
# File 'app/models/optional_param.rb', line 2

def default_value
  @default_value
end

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'app/models/optional_param.rb', line 2

def description
  @description
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'app/models/optional_param.rb', line 2

def name
  @name
end

#typeObject

Returns the value of attribute type.



2
3
4
# File 'app/models/optional_param.rb', line 2

def type
  @type
end

#valid_optionsObject

Returns the value of attribute valid_options.



2
3
4
# File 'app/models/optional_param.rb', line 2

def valid_options
  @valid_options
end