Class: JekyllLilyPondConverter::Lily
- Inherits:
-
Object
- Object
- JekyllLilyPondConverter::Lily
- Defined in:
- lib/jekyll_lilypond_converter/lily.rb
Instance Attribute Summary collapse
-
#snippet ⇒ Object
readonly
Returns the value of attribute snippet.
Instance Method Summary collapse
- #code ⇒ Object
- #code_filename ⇒ Object
- #image_filename ⇒ Object
- #image_link ⇒ Object
-
#initialize(id, extension, snippet) ⇒ Lily
constructor
A new instance of Lily.
Constructor Details
#initialize(id, extension, snippet) ⇒ Lily
Returns a new instance of Lily.
5 6 7 8 9 |
# File 'lib/jekyll_lilypond_converter/lily.rb', line 5 def initialize(id, extension, snippet) @id = id @extension = extension @snippet = snippet end |
Instance Attribute Details
#snippet ⇒ Object (readonly)
Returns the value of attribute snippet.
3 4 5 |
# File 'lib/jekyll_lilypond_converter/lily.rb', line 3 def snippet @snippet end |
Instance Method Details
#code ⇒ Object
23 24 25 |
# File 'lib/jekyll_lilypond_converter/lily.rb', line 23 def code strip_delimiters(snippet) end |
#code_filename ⇒ Object
11 12 13 |
# File 'lib/jekyll_lilypond_converter/lily.rb', line 11 def code_filename "#{id}.ly" end |
#image_filename ⇒ Object
15 16 17 |
# File 'lib/jekyll_lilypond_converter/lily.rb', line 15 def image_filename "#{id}.#{extension}" end |
#image_link ⇒ Object
19 20 21 |
# File 'lib/jekyll_lilypond_converter/lily.rb', line 19 def image_link "![](/lily_images/#{image_filename})\n" end |