Sha256: bd9fcdba86a5628b026c88d9af33df4c55f17056c5833788ec28bb0b65f297d8
Contents?: true
Size: 706 Bytes
Versions: 34
Compression:
Stored size: 706 Bytes
Contents
# frozen_string_literal: true module Quby module Compiler module Entities class ScoreCalculation attr_accessor :key, :label, :sbg_key, :options, :calculation def initialize(key, options, &block) @key = key @label = options[:label] @sbg_key = options[:sbg_key] @options = options @calculation = block end def score @options[:score] end def completion @options[:completion] end def action @options[:action] end def sourcecode options[:ruby_string] || calculation&.to_proc&.source end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems