Class: Phrasify::Phrase
- Inherits:
-
Object
- Object
- Phrasify::Phrase
- Defined in:
- lib/phrasify/phrase.rb
Instance Attribute Summary collapse
-
#match ⇒ Object
readonly
Returns the value of attribute match.
-
#replace ⇒ Object
readonly
Returns the value of attribute replace.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(match, replace) ⇒ Phrase
constructor
A new instance of Phrase.
Constructor Details
#initialize(match, replace) ⇒ Phrase
Returns a new instance of Phrase.
6 7 8 |
# File 'lib/phrasify/phrase.rb', line 6 def initialize(match, replace) @match, @replace = match, replace end |
Instance Attribute Details
#match ⇒ Object (readonly)
Returns the value of attribute match.
4 5 6 |
# File 'lib/phrasify/phrase.rb', line 4 def match @match end |
#replace ⇒ Object (readonly)
Returns the value of attribute replace.
4 5 6 |
# File 'lib/phrasify/phrase.rb', line 4 def replace @replace end |
Class Method Details
.search(phrases) ⇒ Object
10 11 12 |
# File 'lib/phrasify/phrase.rb', line 10 def self.search(phrases) [new("fred", "derf")] end |