Class: Octoparts::Representer::Camelizer
- Inherits:
-
Object
- Object
- Octoparts::Representer::Camelizer
- Includes:
- Uber::Callable
- Defined in:
- lib/octoparts/representer/aggregate_request_representer.rb
Instance Method Summary collapse
- #call(represented) ⇒ Object
-
#initialize(camelcase) ⇒ Camelizer
constructor
A new instance of Camelizer.
Constructor Details
#initialize(camelcase) ⇒ Camelizer
Returns a new instance of Camelizer.
7 8 9 |
# File 'lib/octoparts/representer/aggregate_request_representer.rb', line 7 def initialize(camelcase) @camelcase = camelcase end |
Instance Method Details
#call(represented) ⇒ Object
11 12 13 14 15 |
# File 'lib/octoparts/representer/aggregate_request_representer.rb', line 11 def call(represented) = represented.fetch(:options, {}) = .fetch(:user_options, {}) [:camelize] ? @camelcase : @camelcase.underscore end |