Class: Steep::AST::Signature::Members::Attr

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/ast/signature/members.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location:, kind:, name:, ivar:, type:) ⇒ Attr

Returns a new instance of Attr.



76
77
78
79
80
81
82
# File 'lib/steep/ast/signature/members.rb', line 76

def initialize(location:, kind:, name:, ivar:, type:)
  @location = location
  @kind = kind
  @name = name
  @ivar = ivar
  @type = type
end

Instance Attribute Details

#ivarObject (readonly)

Returns the value of attribute ivar.



73
74
75
# File 'lib/steep/ast/signature/members.rb', line 73

def ivar
  @ivar
end

#kindObject (readonly)

Returns the value of attribute kind.



71
72
73
# File 'lib/steep/ast/signature/members.rb', line 71

def kind
  @kind
end

#locationObject (readonly)

Returns the value of attribute location.



70
71
72
# File 'lib/steep/ast/signature/members.rb', line 70

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



72
73
74
# File 'lib/steep/ast/signature/members.rb', line 72

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



74
75
76
# File 'lib/steep/ast/signature/members.rb', line 74

def type
  @type
end

Instance Method Details

#accessor?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/steep/ast/signature/members.rb', line 88

def accessor?
  kind == :accessor
end

#reader?Boolean

Returns:

  • (Boolean)


84
85
86
# File 'lib/steep/ast/signature/members.rb', line 84

def reader?
  kind == :reader
end