Class: EMTypographer
- Inherits:
-
Object
- Object
- EMTypographer
- Defined in:
- lib/e_m_typographer.rb
Constant Summary collapse
- TYPOGRAPHER_REQUEST_URI =
URI('http://mdash.ru/api.v1.php')
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
7 8 9 |
# File 'lib/e_m_typographer.rb', line 7 def text @text end |
Instance Method Details
#apply ⇒ Object
9 10 11 12 13 |
# File 'lib/e_m_typographer.rb', line 9 def apply response = send_typographer_post_request(text) JSON.parse(response.body)['result'] if response && response.body['result'] end |