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



32
33
34
# File 'lib/pinspec/types.rb', line 32

def class_name
  @class_name
end

#clock_sitesObject (readonly)

Returns the value of attribute clock_sites

Returns:

  • (Object)

    the current value of clock_sites



32
33
34
# File 'lib/pinspec/types.rb', line 32

def clock_sites
  @clock_sites
end

#construction_kindObject (readonly)

Returns the value of attribute construction_kind

Returns:

  • (Object)

    the current value of construction_kind



32
33
34
# File 'lib/pinspec/types.rb', line 32

def construction_kind
  @construction_kind
end

#construction_sourceObject (readonly)

Returns the value of attribute construction_source

Returns:

  • (Object)

    the current value of construction_source



32
33
34
# File 'lib/pinspec/types.rb', line 32

def construction_source
  @construction_source
end

#file_pathObject (readonly)

Returns the value of attribute file_path

Returns:

  • (Object)

    the current value of file_path



32
33
34
# File 'lib/pinspec/types.rb', line 32

def file_path
  @file_path
end

#initializer_paramsObject (readonly)

Returns the value of attribute initializer_params

Returns:

  • (Object)

    the current value of initializer_params



32
33
34
# File 'lib/pinspec/types.rb', line 32

def initializer_params
  @initializer_params
end

#method_nameObject (readonly)

Returns the value of attribute method_name

Returns:

  • (Object)

    the current value of method_name



32
33
34
# File 'lib/pinspec/types.rb', line 32

def method_name
  @method_name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



32
33
34
# File 'lib/pinspec/types.rb', line 32

def params
  @params
end

#referenced_constantsObject (readonly)

Returns the value of attribute referenced_constants

Returns:

  • (Object)

    the current value of referenced_constants



32
33
34
# File 'lib/pinspec/types.rb', line 32

def referenced_constants
  @referenced_constants
end

#source_rangeObject (readonly)

Returns the value of attribute source_range

Returns:

  • (Object)

    the current value of source_range



32
33
34
# File 'lib/pinspec/types.rb', line 32

def source_range
  @source_range
end

#takes_blockObject (readonly)

Returns the value of attribute takes_block

Returns:

  • (Object)

    the current value of takes_block



32
33
34
# File 'lib/pinspec/types.rb', line 32

def takes_block
  @takes_block
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



32
33
34
# File 'lib/pinspec/types.rb', line 32

def visibility
  @visibility
end

Instance Method Details

#clock_dependent?Boolean

Returns:

  • (Boolean)


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

def clock_dependent?
  !clock_sites.empty?
end

#input_paramsObject



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

def input_params
  initializer_params + params
end

#needs_subject?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/pinspec/types.rb', line 50

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

#qualified_nameObject



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

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

#singleton?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/pinspec/types.rb', line 46

def singleton?
  construction_kind == :class_method
end