Class: Rack::API::Formatter::Base
- Inherits:
-
Object
- Object
- Rack::API::Formatter::Base
- Defined in:
- lib/rack/api/formatter/base.rb
Direct Known Subclasses
Defined Under Namespace
Classes: AbstractMethodError
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#object ⇒ Object
Returns the value of attribute object.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(object, env, params) ⇒ Base
constructor
A new instance of Base.
- #to_format ⇒ Object
Constructor Details
#initialize(object, env, params) ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/rack/api/formatter/base.rb', line 11 def initialize(object, env, params) @object, @env, @params = object, env, params end |
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
7 8 9 |
# File 'lib/rack/api/formatter/base.rb', line 7 def env @env end |
#object ⇒ Object
Returns the value of attribute object.
5 6 7 |
# File 'lib/rack/api/formatter/base.rb', line 5 def object @object end |
#params ⇒ Object
Returns the value of attribute params.
6 7 8 |
# File 'lib/rack/api/formatter/base.rb', line 6 def params @params end |
Instance Method Details
#to_format ⇒ Object
15 16 17 |
# File 'lib/rack/api/formatter/base.rb', line 15 def to_format raise AbstractMethodError end |