Sha256: b5b4be3134a5a706d43782da882ddd70dadb66634d5abdecd9d568bd38da1d22
Contents?: true
Size: 540 Bytes
Versions: 14
Compression:
Stored size: 540 Bytes
Contents
module Canard class Abilities @definitions = {} @default_path = 'app/abilities' class << self attr_accessor :default_path attr_writer :definition_paths attr_reader :definitions def definition_paths @definition_paths ||= [@default_path] end def for(name, &block) raise ArgumentError.new('No block of ability definitions given') unless block_given? @definitions[name.to_sym] = block end end end end
Version data entries
14 entries across 14 versions & 1 rubygems