module Tr3llo::Entities
Constants
- Board
- Card
- Checklist
- Comment
- InvalidIDError
- InvalidKeyError
- Label
- List
- SHORTCUT_PREFIX
- User
Public Instance Methods
make_shortcut(type, id)
click to toggle source
# File lib/3llo/entities.rb, line 29 def make_shortcut(type, id) if id.is_a?(String) registry.register(type, id) else raise ArgumentError.new("Invalid ID") end end
parse_id(type, key)
click to toggle source
# File lib/3llo/entities.rb, line 19 def parse_id(type, key) if key.start_with?(SHORTCUT_PREFIX) shortcut = key.delete_prefix(SHORTCUT_PREFIX) registry.reverse_lookup(type, shortcut) else key end end
Private Instance Methods
registry()
click to toggle source
# File lib/3llo/entities.rb, line 39 def registry Application.fetch_registry!() end