Class: ExtractingId::Type
- Inherits:
-
Object
- Object
- ExtractingId::Type
show all
- Defined in:
- lib/extracting_id.rb
Instance Method Summary
collapse
Constructor Details
#initialize(name) ⇒ Type
Returns a new instance of Type.
56
57
58
|
# File 'lib/extracting_id.rb', line 56
def initialize(name)
@name = name
end
|
Instance Method Details
#==(type) ⇒ Object
59
60
61
|
# File 'lib/extracting_id.rb', line 59
def == (type)
@name == type.name
end
|
#capitalize ⇒ Object
65
66
67
68
|
# File 'lib/extracting_id.rb', line 65
def capitalize
c = @name
c[0,1].capitalize + c[1..-1]
end
|
#define ⇒ Object
69
70
71
|
# File 'lib/extracting_id.rb', line 69
def define
"k" + self.class_name + self.capitalize
end
|
#impDefine ⇒ Object
75
76
77
|
# File 'lib/extracting_id.rb', line 75
def impDefine
"\#define #{self.define} #{self.nsString}\n"
end
|
#name ⇒ Object
62
63
64
|
# File 'lib/extracting_id.rb', line 62
def name
@name
end
|
#nsString ⇒ Object
72
73
74
|
# File 'lib/extracting_id.rb', line 72
def nsString
'@"' + @name + '"'
end
|