Class: TermNote::Pane::Code
- Inherits:
-
Object
- Object
- TermNote::Pane::Code
- Includes:
- TermNote::Pane
- Defined in:
- lib/termnote/pane/code.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
Returns the value of attribute language.
-
#source ⇒ Object
Returns the value of attribute source.
Attributes included from TermNote::Pane
Instance Method Summary collapse
-
#initialize(options) ⇒ Code
constructor
A new instance of Code.
- #rows ⇒ Object
Methods included from TermNote::Pane
Constructor Details
#initialize(options) ⇒ Code
Returns a new instance of Code.
8 9 10 11 |
# File 'lib/termnote/pane/code.rb', line 8 def initialize() @source = [:source] || ['source'] @language = [:language] || ['language'] end |
Instance Attribute Details
#language ⇒ Object
Returns the value of attribute language.
6 7 8 |
# File 'lib/termnote/pane/code.rb', line 6 def language @language end |
#source ⇒ Object
Returns the value of attribute source.
6 7 8 |
# File 'lib/termnote/pane/code.rb', line 6 def source @source end |
Instance Method Details
#rows ⇒ Object
13 14 15 |
# File 'lib/termnote/pane/code.rb', line 13 def rows highlighted.split("\n") end |