Class: RuboCop::Cop::HashShorthandSyntax::DefNode
- Inherits:
-
Struct
- Object
- Struct
- RuboCop::Cop::HashShorthandSyntax::DefNode
- Defined in:
- lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
Instance Method Summary collapse
Instance Method Details
#first_argument ⇒ Object
225 226 227 |
# File 'lib/rubocop/cop/mixin/hash_shorthand_syntax.rb', line 225 def first_argument node.first_argument end |
#last_argument ⇒ Object
229 230 231 |
# File 'lib/rubocop/cop/mixin/hash_shorthand_syntax.rb', line 229 def last_argument node.last_argument end |
#selector ⇒ Object
217 218 219 220 221 222 223 |
# File 'lib/rubocop/cop/mixin/hash_shorthand_syntax.rb', line 217 def selector if node.loc.respond_to?(:selector) node.loc.selector else node.loc.keyword end end |