Class: BrightSerializer::Entity::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/bright_serializer/entity/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model, endpoint) ⇒ Parser

Returns a new instance of Parser.



8
9
10
11
# File 'lib/bright_serializer/entity/parser.rb', line 8

def initialize(model, endpoint)
  @model = model
  @endpoint = endpoint
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



6
7
8
# File 'lib/bright_serializer/entity/parser.rb', line 6

def endpoint
  @endpoint
end

#modelObject (readonly)

Returns the value of attribute model.



6
7
8
# File 'lib/bright_serializer/entity/parser.rb', line 6

def model
  @model
end

Instance Method Details

#callObject



13
14
15
# File 'lib/bright_serializer/entity/parser.rb', line 13

def call
  @model.entity
end