Class: Utils::IRB::Shell::WrapperBase
- Inherits:
-
Object
- Object
- Utils::IRB::Shell::WrapperBase
show all
- Includes:
- Comparable
- Defined in:
- lib/utils/irb.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
111
112
113
114
115
116
117
118
119
120
121
|
# File 'lib/utils/irb.rb', line 111
def initialize(name)
@name =
case
when name.respond_to?(:to_str)
name.to_str
when name.respond_to?(:to_sym)
name.to_sym.to_s
else
name.to_s
end
end
|
Instance Attribute Details
#description ⇒ Object
Also known as:
to_str, inspect, to_s
Returns the value of attribute description.
125
126
127
|
# File 'lib/utils/irb.rb', line 125
def description
@description
end
|
Returns the value of attribute name.
123
124
125
|
# File 'lib/utils/irb.rb', line 123
def name
@name
end
|
Instance Method Details
#<=>(other) ⇒ Object
143
144
145
|
# File 'lib/utils/irb.rb', line 143
def <=>(other)
@name <=> other.name
end
|
#==(name) ⇒ Object
Also known as:
eql?
133
134
135
|
# File 'lib/utils/irb.rb', line 133
def ==(name)
@name = name
end
|
139
140
141
|
# File 'lib/utils/irb.rb', line 139
def hash
@name.hash
end
|