Skip to content

Commit

Permalink
fix(interface/guest_building_access): subclass detection
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Sep 12, 2024
1 parent 0d5a935 commit 64dd565
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: placeos-driver
version: 7.2.8
version: 7.2.9
crystal: ">= 1.0.0"

dependencies:
Expand Down
14 changes: 8 additions & 6 deletions src/placeos-driver/interface/guest_building_access.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ abstract class PlaceOS::Driver
end

macro included
{% begin %}
alias SubKlassAccessDetails = {{ parse_type("::PlaceOS::Driver::Interface::GuestBuildingAccess::AccessDetails").resolve.subclasses.first }}
{% end %}
macro finally
\{% begin %}
alias SubKlassAccessDetails = \{{ parse_type("AccessDetails").resolve.subclasses.first }}
\{% end %}

# revoke access to a building
def revoke_guest_access(details : SubKlassAccessDetails) : Nil
revoke_access details
# revoke access to a building
def revoke_guest_access(details : SubKlassAccessDetails) : Nil
revoke_access details
end
end
end

Expand Down

0 comments on commit 64dd565

Please sign in to comment.