lib/vedeu/repository/command.rb in vedeu-0.0.18 vs lib/vedeu/repository/command.rb in vedeu-0.0.19
- old
+ new
@@ -10,12 +10,12 @@
def initialize(attributes = {})
@attributes = attributes || {}
@name = attributes[:name]
@klass = attributes[:klass]
- @keyword = attributes.fetch(:options, {}).fetch(:keyword, "")
- @keypress = attributes.fetch(:options, {}).fetch(:keypress, "")
+ @keyword = attributes.fetch(:options, {}).fetch(:keyword, '')
+ @keypress = attributes.fetch(:options, {}).fetch(:keypress, '')
end
def create
CommandRepository.create(self)
self
@@ -24,10 +24,10 @@
def execute(args = [])
executable.call(*args)
end
def executable
- Proc.new { |*args| attributes[:klass].dispatch(*args) }
+ proc { |*args| attributes[:klass].dispatch(*args) }
end
end
module ClassMethods
def command(name, klass, options = {})