Class: Pinspec::TargetProfile

Inherits:
Data
  • Object
show all
Defined in:
lib/pinspec/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



41
42
43
# File 'lib/pinspec/types.rb', line 41

def class_name
  @class_name
end

#clock_sitesObject (readonly)

Returns the value of attribute clock_sites

Returns:

  • (Object)

    the current value of clock_sites



41
42
43
# File 'lib/pinspec/types.rb', line 41

def clock_sites
  @clock_sites
end

#construction_kindObject (readonly)

Returns the value of attribute construction_kind

Returns:

  • (Object)

    the current value of construction_kind



41
42
43
# File 'lib/pinspec/types.rb', line 41

def construction_kind
  @construction_kind
end

#file_pathObject (readonly)

Returns the value of attribute file_path

Returns:

  • (Object)

    the current value of file_path



41
42
43
# File 'lib/pinspec/types.rb', line 41

def file_path
  @file_path
end

#initializer_paramsObject (readonly)

Returns the value of attribute initializer_params

Returns:

  • (Object)

    the current value of initializer_params



41
42
43
# File 'lib/pinspec/types.rb', line 41

def initializer_params
  @initializer_params
end

#method_nameObject (readonly)

Returns the value of attribute method_name

Returns:

  • (Object)

    the current value of method_name



41
42
43
# File 'lib/pinspec/types.rb', line 41

def method_name
  @method_name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



41
42
43
# File 'lib/pinspec/types.rb', line 41

def params
  @params
end

#referenced_constantsObject (readonly)

Returns the value of attribute referenced_constants

Returns:

  • (Object)

    the current value of referenced_constants



41
42
43
# File 'lib/pinspec/types.rb', line 41

def referenced_constants
  @referenced_constants
end

#source_rangeObject (readonly)

Returns the value of attribute source_range

Returns:

  • (Object)

    the current value of source_range



41
42
43
# File 'lib/pinspec/types.rb', line 41

def source_range
  @source_range
end

#takes_blockObject (readonly)

Returns the value of attribute takes_block

Returns:

  • (Object)

    the current value of takes_block



41
42
43
# File 'lib/pinspec/types.rb', line 41

def takes_block
  @takes_block
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



41
42
43
# File 'lib/pinspec/types.rb', line 41

def visibility
  @visibility
end

Instance Method Details

#clock_dependent?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/pinspec/types.rb', line 66

def clock_dependent?
  !clock_sites.empty?
end

#input_paramsObject



70
71
72
# File 'lib/pinspec/types.rb', line 70

def input_params
  initializer_params + params
end

#needs_subject?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/pinspec/types.rb', line 58

def needs_subject?
  !%i[class_method model_instance].include?(construction_kind)
end

#qualified_nameObject



62
63
64
# File 'lib/pinspec/types.rb', line 62

def qualified_name
  singleton? ? "#{class_name}.#{method_name}" : "#{class_name}##{method_name}"
end

#singleton?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/pinspec/types.rb', line 54

def singleton?
  construction_kind == :class_method
end