Class: Bruhl::QuotedString
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) ⇒ QuotedString
constructor
A new instance of QuotedString.
- #inspect ⇒ Object
- #to_s ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize(str) ⇒ QuotedString
Returns a new instance of QuotedString.
82 83 84 |
# File 'lib/bruhl.rb', line 82 def initialize(str) @str = str end |
Instance Attribute Details
#str ⇒ Object (readonly)
Returns the value of attribute str.
81 82 83 |
# File 'lib/bruhl.rb', line 81 def str @str end |
Instance Method Details
#<=>(other) ⇒ Object
86 87 88 |
# File 'lib/bruhl.rb', line 86 def <=>(other) other.respond_to?(:to_str) && @str <=> other.to_str end |
#eql?(other) ⇒ Boolean
90 91 92 |
# File 'lib/bruhl.rb', line 90 def eql?(other) self == other end |
#hash ⇒ Object
94 95 96 |
# File 'lib/bruhl.rb', line 94 def hash @str.hash end |
#inspect ⇒ Object
98 99 100 |
# File 'lib/bruhl.rb', line 98 def inspect to_s end |
#to_s ⇒ Object
102 103 104 |
# File 'lib/bruhl.rb', line 102 def to_s @str end |
#to_str ⇒ Object
106 107 108 |
# File 'lib/bruhl.rb', line 106 def to_str @str end |