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
-
#object ⇒ Object
Returns the value of attribute object.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(object, params) ⇒ Base
constructor
A new instance of Base.
- #to_format ⇒ Object
Constructor Details
#initialize(object, params) ⇒ Base
Returns a new instance of Base.
10 11 12 |
# File 'lib/rack/api/formatter/base.rb', line 10 def initialize(object, params) @object, @params = object, params end |
Instance Attribute Details
#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
14 15 16 |
# File 'lib/rack/api/formatter/base.rb', line 14 def to_format raise AbstractMethodError end |