Class: Phrasify::Phrase

Inherits:
Object
  • Object
show all
Defined in:
lib/phrasify/phrase.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#matchObject (readonly)

Returns the value of attribute match.



4
5
6
# File 'lib/phrasify/phrase.rb', line 4

def match
  @match
end

#replaceObject (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