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
149
150
151
152
153
154
155
156
157
158
159
|
# File 'lib/utils/irb.rb', line 149
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.
163
164
165
|
# File 'lib/utils/irb.rb', line 163
def description
@description
end
|
Returns the value of attribute name.
161
162
163
|
# File 'lib/utils/irb.rb', line 161
def name
@name
end
|
Instance Method Details
#<=>(other) ⇒ Object
181
182
183
|
# File 'lib/utils/irb.rb', line 181
def <=>(other)
@name <=> other.name
end
|
#==(name) ⇒ Object
Also known as:
eql?
171
172
173
|
# File 'lib/utils/irb.rb', line 171
def ==(name)
@name = name
end
|
177
178
179
|
# File 'lib/utils/irb.rb', line 177
def hash
@name.hash
end
|