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.
180 181 182 183 |
# File 'lib/scout_apm/error_service/error_record.rb', line 180 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.
178 179 180 |
# File 'lib/scout_apm/error_service/error_record.rb', line 178 def char_limit @char_limit end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
177 178 179 |
# File 'lib/scout_apm/error_service/error_record.rb', line 177 def text @text end |
Instance Method Details
#to_s ⇒ Object
185 186 187 |
# File 'lib/scout_apm/error_service/error_record.rb', line 185 def to_s text[0..char_limit] end |