Class: LooseTightDictionary::I
- Inherits:
-
Object
- Object
- LooseTightDictionary::I
- Defined in:
- lib/loose_tight_dictionary.rb
Instance Attribute Summary collapse
-
#case_sensitive ⇒ Object
readonly
Returns the value of attribute case_sensitive.
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
-
#str ⇒ Object
readonly
Returns the value of attribute str.
Instance Method Summary collapse
-
#initialize(regexp, str, case_sensitive) ⇒ I
constructor
A new instance of I.
Constructor Details
#initialize(regexp, str, case_sensitive) ⇒ I
Returns a new instance of I.
266 267 268 269 270 271 |
# File 'lib/loose_tight_dictionary.rb', line 266 def initialize(regexp, str, case_sensitive) @regexp = regexp @str = str @identity = regexp.match(str).captures.compact.join @identity = @identity.downcase if case_sensitive end |
Instance Attribute Details
#case_sensitive ⇒ Object (readonly)
Returns the value of attribute case_sensitive.
265 266 267 |
# File 'lib/loose_tight_dictionary.rb', line 265 def case_sensitive @case_sensitive end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
265 266 267 |
# File 'lib/loose_tight_dictionary.rb', line 265 def identity @identity end |
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
265 266 267 |
# File 'lib/loose_tight_dictionary.rb', line 265 def regexp @regexp end |
#str ⇒ Object (readonly)
Returns the value of attribute str.
265 266 267 |
# File 'lib/loose_tight_dictionary.rb', line 265 def str @str end |