Class: SlackTransformer::Html::Code
- Inherits:
-
Object
- Object
- SlackTransformer::Html::Code
- Defined in:
- lib/slack_transformer/html/code.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
-
#initialize(input) ⇒ Code
constructor
A new instance of Code.
- #to_slack ⇒ Object
Constructor Details
#initialize(input) ⇒ Code
Returns a new instance of Code.
6 7 8 |
# File 'lib/slack_transformer/html/code.rb', line 6 def initialize(input) @input = input end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
4 5 6 |
# File 'lib/slack_transformer/html/code.rb', line 4 def input @input end |
Instance Method Details
#to_slack ⇒ Object
10 11 12 |
# File 'lib/slack_transformer/html/code.rb', line 10 def to_slack input.gsub(/<\/?code>/, '`') end |