Class: Hashira::Smells::TypeContext
- Inherits:
-
Data
- Object
- Data
- Hashira::Smells::TypeContext
- Defined in:
- lib/hashira/smells/contexts.rb
Instance Attribute Summary collapse
-
#defs ⇒ Object
readonly
Returns the value of attribute defs.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
Instance Attribute Details
#defs ⇒ Object (readonly)
Returns the value of attribute defs
53 54 55 |
# File 'lib/hashira/smells/contexts.rb', line 53 def defs @defs end |
#file ⇒ Object (readonly)
Returns the value of attribute file
53 54 55 |
# File 'lib/hashira/smells/contexts.rb', line 53 def file @file end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
53 54 55 |
# File 'lib/hashira/smells/contexts.rb', line 53 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name
53 54 55 |
# File 'lib/hashira/smells/contexts.rb', line 53 def name @name end |
#node ⇒ Object (readonly)
Returns the value of attribute node
53 54 55 |
# File 'lib/hashira/smells/contexts.rb', line 53 def node @node end |
Instance Method Details
#line ⇒ Object
55 |
# File 'lib/hashira/smells/contexts.rb', line 55 def line = node.location.start_line |
#owned ⇒ Object
59 |
# File 'lib/hashira/smells/contexts.rb', line 59 def owned = defs.reject(&:singleton?) |
#site ⇒ Object
61 |
# File 'lib/hashira/smells/contexts.rb', line 61 def site = "#{file}:#{line}" |
#subject ⇒ Object
57 |
# File 'lib/hashira/smells/contexts.rb', line 57 def subject = name |