Module: Cukunity::Unity::TextHintMethods

Included in:
Hint
Defined in:
lib/cukunity/unity/text_hint_methods.rb

Instance Method Summary collapse

Instance Method Details

#reads_as?(text) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/cukunity/unity/text_hint_methods.rb', line 8

def reads_as?(text)
  text.to_s == self.text 
end

#reads_like?(regexp) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/cukunity/unity/text_hint_methods.rb', line 12

def reads_like?(regexp)
  !text.match(regexp).nil?
end

#textObject



4
5
6
# File 'lib/cukunity/unity/text_hint_methods.rb', line 4

def text
  json
end