Class: Fasterer::MethodDefinitionArgument
- Inherits:
-
Object
- Object
- Fasterer::MethodDefinitionArgument
- Defined in:
- lib/fasterer/method_definition.rb
Instance Attribute Summary collapse
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #default_argument? ⇒ Boolean
-
#initialize(element) ⇒ MethodDefinitionArgument
constructor
A new instance of MethodDefinitionArgument.
- #keyword_argument? ⇒ Boolean
- #regular_argument? ⇒ Boolean
Constructor Details
#initialize(element) ⇒ MethodDefinitionArgument
Returns a new instance of MethodDefinitionArgument.
61 62 63 64 65 |
# File 'lib/fasterer/method_definition.rb', line 61 def initialize(element) @element = element set_name set_argument_type end |
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
59 60 61 |
# File 'lib/fasterer/method_definition.rb', line 59 def element @element end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
59 60 61 |
# File 'lib/fasterer/method_definition.rb', line 59 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
59 60 61 |
# File 'lib/fasterer/method_definition.rb', line 59 def type @type end |
Instance Method Details
#default_argument? ⇒ Boolean
71 72 73 |
# File 'lib/fasterer/method_definition.rb', line 71 def default_argument? @type == :default_argument end |
#keyword_argument? ⇒ Boolean
75 76 77 |
# File 'lib/fasterer/method_definition.rb', line 75 def keyword_argument? @type == :keyword_argument end |
#regular_argument? ⇒ Boolean
67 68 69 |
# File 'lib/fasterer/method_definition.rb', line 67 def regular_argument? @type == :regular_argument end |