Class: TrackedString

Inherits:
String show all
Defined in:
lib/hierarchy_string.rb

Constant Summary

Constants inherited from String

String::FN_ID_LEN, String::FN_MAX_LEN, String::FN_PATTERN, String::FN_REPLACEMENT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from String

#ansi_control_sequence, #bgreen, #black, #blank?, #blinking, #blue, #bold, #bold_italic, #bold_underline, #bred, #bwhite, #byellow, #cyan, #delete_even_chars, #delete_even_chars!, #deref, #dim, #fg_bg_rgb_color, #fg_rgb_color, #green, #hex_to_fg_bg_rgb, #hex_to_rgb, #hidden, #indigo, #inverse, #italic, #magenta, #method_missing, #orange, #plain, #present?, #pub_name, #red, #sort_chars, #sort_chars!, #strikethrough, #underline, #underline_italic, #violet, #white, #yellow

Constructor Details

#initialize(str) ⇒ TrackedString

Returns a new instance of TrackedString.



8
9
10
11
12
# File 'lib/hierarchy_string.rb', line 8

def initialize(str)
  super
  @exceeded = false
  @truncated = false
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class String

Instance Attribute Details

#exceededObject

Returns the value of attribute exceeded.



6
7
8
# File 'lib/hierarchy_string.rb', line 6

def exceeded
  @exceeded
end

#truncatedObject

Returns the value of attribute truncated.



6
7
8
# File 'lib/hierarchy_string.rb', line 6

def truncated
  @truncated
end