File: miquire_to_spec.rb

package info (click to toggle)
mikutter 4.1.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,260 kB
  • sloc: ruby: 20,126; sh: 183; makefile: 19
file content (21 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-

module Miquire::ToSpec
  refine Symbol do
    def to_spec
      Miquire::Plugin.get_spec_by_slug(self)
    end
  end

  refine String do
    def to_spec
      to_sym.to_spec
    end
  end

  refine Hash do
    def to_spec
      self
    end
  end
end