Class: Param

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, type = nil, description = nil, valid_options = nil, invalid_options = nil) ⇒ Param

Returns a new instance of Param.



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

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

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#invalid_optionsObject

Returns the value of attribute invalid_options.



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

def invalid_options
  @invalid_options
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#valid_optionsObject

Returns the value of attribute valid_options.



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

def valid_options
  @valid_options
end