Class: GoonModelGen::Converter::TypeRef

Inherits:
Object
  • Object
show all
Defined in:
lib/goon_model_gen/converter/type_ref.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, package_path) ⇒ TypeRef

Returns a new instance of TypeRef.



9
10
11
# File 'lib/goon_model_gen/converter/type_ref.rb', line 9

def initialize(name, package_path)
  @name, @package_path = name, package_path
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/goon_model_gen/converter/type_ref.rb', line 6

def name
  @name
end

#package_base_pathObject

Returns the value of attribute package_base_path.



7
8
9
# File 'lib/goon_model_gen/converter/type_ref.rb', line 7

def package_base_path
  @package_base_path
end

#package_pathObject (readonly)

Returns the value of attribute package_path.



6
7
8
# File 'lib/goon_model_gen/converter/type_ref.rb', line 6

def package_path
  @package_path
end

#slice_with_ptrObject

Returns the value of attribute slice_with_ptr.



8
9
10
# File 'lib/goon_model_gen/converter/type_ref.rb', line 8

def slice_with_ptr
  @slice_with_ptr
end

Instance Method Details

#ordinary_nameObject



13
14
15
# File 'lib/goon_model_gen/converter/type_ref.rb', line 13

def ordinary_name
  name.include?('.') ? name.split('.').last : name
end