lib/vedeu/dsl/menu.rb in vedeu-0.6.1 vs lib/vedeu/dsl/menu.rb in vedeu-0.6.2

- old
+ new

@@ -30,10 +30,11 @@ # # @return [Array] def item(element) model.collection << element end + alias_method :item=, :item # Define the items for the menu. Most powerful when used with one of your # model classes. # # In the 'my_playlist' example below, your `Track` model may return a @@ -51,10 +52,11 @@ # the menu items. # @return [Array] def items(collection = []) model.collection = collection end + alias_method :items=, :items # The name of the menu. Used to reference the menu throughout your # application's execution lifetime. # # Vedeu.menu do @@ -65,9 +67,10 @@ # @param value [String] # @return [String] def name(value) model.name = value end + alias_method :name=, :name end # Menu end # DSL