Class: Apipie::Generator::Swagger::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/apipie/generator/swagger/type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, str_format = nil) ⇒ Type

Returns a new instance of Type.



4
5
6
7
# File 'lib/apipie/generator/swagger/type.rb', line 4

def initialize(type, str_format = nil)
  @type = type
  @str_format = str_format
end

Instance Attribute Details

#str_formatObject (readonly)

Returns the value of attribute str_format.



2
3
4
# File 'lib/apipie/generator/swagger/type.rb', line 2

def str_format
  @str_format
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/apipie/generator/swagger/type.rb', line 13

def ==(other)
  other.to_s == self.to_s
end

#to_sObject



9
10
11
# File 'lib/apipie/generator/swagger/type.rb', line 9

def to_s
  @type
end