lib/fasterer/method_definition.rb in fasterer-0.2.0 vs lib/fasterer/method_definition.rb in fasterer-0.2.1
- old
+ new
@@ -54,11 +54,10 @@
arguments_element.last
end
end
class MethodDefinitionArgument
-
attr_reader :element, :name, :type
def initialize(element)
@element = element
set_name
@@ -83,15 +82,14 @@
@name = element.is_a?(Symbol) ? element : element[1]
end
def set_argument_type
@type = if element.is_a?(Symbol)
- :regular_argument
- elsif element.is_a?(Sexp) && element.sexp_type == :lasgn
- :default_argument
- elsif element.is_a?(Sexp) && element.sexp_type == :kwarg
- :keyword_argument
+ :regular_argument
+ elsif element.is_a?(Sexp) && element.sexp_type == :lasgn
+ :default_argument
+ elsif element.is_a?(Sexp) && element.sexp_type == :kwarg
+ :keyword_argument
end
end
end
-
end