Class: Rmsgen::Link
- Inherits:
-
Object
- Object
- Rmsgen::Link
- Defined in:
- lib/rmsgen/link.rb
Instance Method Summary collapse
-
#initialize(text, href) ⇒ Link
constructor
A new instance of Link.
- #to_s ⇒ Object
Constructor Details
#initialize(text, href) ⇒ Link
Returns a new instance of Link.
3 4 5 6 |
# File 'lib/rmsgen/link.rb', line 3 def initialize(text, href) @text = text @href = href end |
Instance Method Details
#to_s ⇒ Object
8 9 10 |
# File 'lib/rmsgen/link.rb', line 8 def to_s %{<a href='#{@href}'>#{@text}</a>} end |