lib/keynote.rb in keynote-0.2.2 vs lib/keynote.rb in keynote-0.2.3
- old
+ new
@@ -40,15 +40,15 @@
# Return a presenter wrapping the given objects. The type of the
# presenter is specified in underscore form by the first parameter.
# @example
# present(view, :foo_bar, MyModel.new) # => #<FooBarPresenter:0x0002>
# @param [ActionView::Base] view
- # @param [Symbol] presenter_name
+ # @param [Symbol, String] presenter_name
# @param [Array] objects
# @return [Keynote::Presenter]
#
def present(view, *objects)
- if objects[0].is_a?(Symbol)
+ if objects[0].is_a?(Symbol) || objects[0].is_a?(String)
name = objects.shift
else
name = presenter_name_from_object(objects[0])
end