Skip to content

Case matching operator for results #120

Closed
@julik

Description

@julik

If we implement the case matching on our Result objects we could in theory make the following usage pattern possible:

result = FormatParser.parse(...)
case result
when :image
  # render thumbnail
when :audio
  # render soundbite
when :video
  # extract the first N seconds and render soundbite
else
  # render a generic icon and be done...
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions