Class: Bruhl::RawString
Instance Attribute Summary collapse
-
#str ⇒ Object
readonly
Returns the value of attribute str.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(str) ⇒ RawString
constructor
A new instance of RawString.
- #inspect ⇒ Object
- #to_s ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize(str) ⇒ RawString
Returns a new instance of RawString.
114 115 116 |
# File 'lib/bruhl.rb', line 114 def initialize(str) @str = str end |
Instance Attribute Details
#str ⇒ Object (readonly)
Returns the value of attribute str.
113 114 115 |
# File 'lib/bruhl.rb', line 113 def str @str end |
Instance Method Details
#<=>(other) ⇒ Object
118 119 120 |
# File 'lib/bruhl.rb', line 118 def <=>(other) other.respond_to?(:to_str) && @str <=> other.to_str end |
#eql?(other) ⇒ Boolean
122 123 124 |
# File 'lib/bruhl.rb', line 122 def eql?(other) self == other end |
#hash ⇒ Object
126 127 128 |
# File 'lib/bruhl.rb', line 126 def hash @str.hash end |
#inspect ⇒ Object
130 131 132 |
# File 'lib/bruhl.rb', line 130 def inspect to_s end |
#to_s ⇒ Object
134 135 136 |
# File 'lib/bruhl.rb', line 134 def to_s @str end |
#to_str ⇒ Object
138 139 140 |
# File 'lib/bruhl.rb', line 138 def to_str @str end |