Class: GrapeSwagger::Entity::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/grape-swagger/entity/parser.rb

Defined Under Namespace

Classes: Alias

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model, endpoint) ⇒ Parser

Returns a new instance of Parser.



8
9
10
11
12
# File 'lib/grape-swagger/entity/parser.rb', line 8

def initialize(model, endpoint)
  @model = model
  @endpoint = endpoint
  @attribute_parser = AttributeParser.new(endpoint)
end

Instance Attribute Details

#attribute_parserObject (readonly)

Returns the value of attribute attribute_parser.



6
7
8
# File 'lib/grape-swagger/entity/parser.rb', line 6

def attribute_parser
  @attribute_parser
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



5
6
7
# File 'lib/grape-swagger/entity/parser.rb', line 5

def endpoint
  @endpoint
end

#modelObject (readonly)

Returns the value of attribute model.



4
5
6
# File 'lib/grape-swagger/entity/parser.rb', line 4

def model
  @model
end

Instance Method Details

#callObject



14
15
16
# File 'lib/grape-swagger/entity/parser.rb', line 14

def call
  parse_grape_entity_params(extract_params(model))
end