Class: RamlParser::Model::NamedParameter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type = nil, display_name = nil, description = nil, required = false, default = nil, example = nil, min_length = nil, max_length = nil, minimum = nil, maximum = nil, repeat = nil, enum = nil, pattern = nil) ⇒ NamedParameter

Returns a new instance of NamedParameter.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/raml_parser/model.rb', line 112

def initialize(name, type = nil, display_name = nil, description = nil, required = false, default = nil, example = nil, min_length = nil, max_length = nil, minimum = nil, maximum = nil, repeat = nil, enum = nil, pattern = nil)
  @name = name
  @type = type
  @display_name = display_name
  @description = description
  @required = required
  @default = default
  @example = example
  @min_length = min_length
  @max_length = max_length
  @minimum = minimum
  @maximum = maximum
  @repeat = repeat
  @enum = enum
  @pattern = pattern
end

Instance Attribute Details

#defaultObject

Returns the value of attribute default.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def default
  @default
end

#descriptionObject

Returns the value of attribute description.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def description
  @description
end

#display_nameObject

Returns the value of attribute display_name.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def display_name
  @display_name
end

#enumObject

Returns the value of attribute enum.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def enum
  @enum
end

#exampleObject

Returns the value of attribute example.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def example
  @example
end

#max_lengthObject

Returns the value of attribute max_length.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def max_length
  @max_length
end

#maximumObject

Returns the value of attribute maximum.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def maximum
  @maximum
end

#min_lengthObject

Returns the value of attribute min_length.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def min_length
  @min_length
end

#minimumObject

Returns the value of attribute minimum.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def minimum
  @minimum
end

#nameObject

Returns the value of attribute name.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def name
  @name
end

#patternObject

Returns the value of attribute pattern.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def pattern
  @pattern
end

#repeatObject

Returns the value of attribute repeat.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def repeat
  @repeat
end

#requiredObject

Returns the value of attribute required.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def required
  @required
end

#typeObject

Returns the value of attribute type.



110
111
112
# File 'lib/raml_parser/model.rb', line 110

def type
  @type
end