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.



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

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.



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

def attribute_parser
  @attribute_parser
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



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

def endpoint
  @endpoint
end

#modelObject (readonly)

Returns the value of attribute model.



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

def model
  @model
end

Instance Method Details

#callObject



16
17
18
# File 'lib/grape-swagger/entity/parser.rb', line 16

def call
  parse_grape_entity_params(extract_params(model))
end