Class: PictureTag::Instructions::Instruction
- Inherits:
-
Object
- Object
- PictureTag::Instructions::Instruction
- Defined in:
- lib/jekyll_picture_tag/instructions.rb
Overview
Generic instruction, meant to be inherited. Children of this class must override the source method, and likely want to override valid?, coerce, and error_message as applicable.
Direct Known Subclasses
Backend, Baseurl, CdnUrl, ConditionalInstruction, Config, DestDir, EnvInstruction, FallbackFormat, FallbackWidth, Formats, HtmlAttributes, JekyllEnv, MediaPresets, Nomarkdown, OutputClass, Page, Params, Pconfig, Preset, Site, SourceDir, SourceImages
Instance Method Summary collapse
-
#value ⇒ Object
Memoized value of the given instruction.
Instance Method Details
#value ⇒ Object
Memoized value of the given instruction. This is the public API.
18 19 20 21 22 23 24 |
# File 'lib/jekyll_picture_tag/instructions.rb', line 18 def value return @value if defined?(@value) raise ArgumentError, unless valid? @value = coerced end |