Class: BrightSerializer::Entity::Parser
- Inherits:
-
Object
- Object
- BrightSerializer::Entity::Parser
- Defined in:
- lib/bright_serializer/entity/parser.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model, endpoint) ⇒ Parser
constructor
A new instance of Parser.
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
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
6 7 8 |
# File 'lib/bright_serializer/entity/parser.rb', line 6 def endpoint @endpoint end |
#model ⇒ Object (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
#call ⇒ Object
13 14 15 |
# File 'lib/bright_serializer/entity/parser.rb', line 13 def call @model.entity end |