Class: ScoutApm::ErrorService::ErrorRecord::LengthLimit
- Inherits:
-
Object
- Object
- ScoutApm::ErrorService::ErrorRecord::LengthLimit
- Defined in:
- lib/scout_apm/error_service/error_record.rb
Instance Attribute Summary collapse
-
#char_limit ⇒ Object
readonly
Returns the value of attribute char_limit.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, char_limit = 100) ⇒ LengthLimit
constructor
A new instance of LengthLimit.
- #to_s ⇒ Object
Constructor Details
#initialize(text, char_limit = 100) ⇒ LengthLimit
Returns a new instance of LengthLimit.
200 201 202 203 |
# File 'lib/scout_apm/error_service/error_record.rb', line 200 def initialize(text, char_limit=100) @text = text @char_limit = char_limit end |
Instance Attribute Details
#char_limit ⇒ Object (readonly)
Returns the value of attribute char_limit.
198 199 200 |
# File 'lib/scout_apm/error_service/error_record.rb', line 198 def char_limit @char_limit end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
197 198 199 |
# File 'lib/scout_apm/error_service/error_record.rb', line 197 def text @text end |
Instance Method Details
#to_s ⇒ Object
205 206 207 |
# File 'lib/scout_apm/error_service/error_record.rb', line 205 def to_s text[0..char_limit] end |