Class: Fastererer::MethodDefinitionArgument
- Inherits:
-
Object
- Object
- Fastererer::MethodDefinitionArgument
- Defined in:
- lib/fastererer/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.
60 61 62 63 64 |
# File 'lib/fastererer/method_definition.rb', line 60 def initialize(element) @element = element set_name set_argument_type end |
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
58 59 60 |
# File 'lib/fastererer/method_definition.rb', line 58 def element @element end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
58 59 60 |
# File 'lib/fastererer/method_definition.rb', line 58 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
58 59 60 |
# File 'lib/fastererer/method_definition.rb', line 58 def type @type end |
Instance Method Details
#default_argument? ⇒ Boolean
70 71 72 |
# File 'lib/fastererer/method_definition.rb', line 70 def default_argument? @type == :default_argument end |
#keyword_argument? ⇒ Boolean
74 75 76 |
# File 'lib/fastererer/method_definition.rb', line 74 def keyword_argument? @type == :keyword_argument end |
#regular_argument? ⇒ Boolean
66 67 68 |
# File 'lib/fastererer/method_definition.rb', line 66 def regular_argument? @type == :regular_argument end |