Title: receives method should be defined as a singleton method on the singleton class · Issue #401 · hyperstack-org/hyperstack · GitHub
Open Graph Title: receives method should be defined as a singleton method on the singleton class · Issue #401 · hyperstack-org/hyperstack
X Title: receives method should be defined as a singleton method on the singleton class · Issue #401 · hyperstack-org/hyperstack
Description: The receives method can be used as a class method or an instance method, but not as singleton method on the class: class SomeComponent < HyperComponent after_mount do receives(SomeOperation) { ...self is an instance in here... } end rece...
Open Graph Description: The receives method can be used as a class method or an instance method, but not as singleton method on the class: class SomeComponent < HyperComponent after_mount do receives(SomeOperation) { ...s...
X Description: The receives method can be used as a class method or an instance method, but not as singleton method on the class: class SomeComponent < HyperComponent after_mount do receives(SomeOperation) { ....
Opengraph URL: https://github.com/hyperstack-org/hyperstack/issues/401
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"receives method should be defined as a singleton method on the singleton class","articleBody":"The `receives` method can be used as a class method or an instance method, but not as singleton method on the class:\r\n\r\n```ruby\r\nclass SomeComponent \u003c HyperComponent\r\n after_mount do\r\n receives(SomeOperation) { ...self is an instance in here... } \r\n end\r\n receives(SomeOperation) { ... self is the class in here ... } \r\n class \u003c\u003c self \r\n def some_class_method\r\n end \r\n receives(SomeOperation) { ... doesn't work! ... }\r\n end\r\nend\r\n```\r\n The third case should just set up the receiver at the class level so that things read better.\r\n\r\nOtherwise, if you are defining a bunch of class methods, and need to have a receiver at the class level, you \r\nhave to step outside the singleton class, to set the receiver up.\r\n\r\n","author":{"url":"https://github.com/catmando","@type":"Person","name":"catmando"},"datePublished":"2021-04-06T17:29:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/401/hyperstack/issues/401"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f0bfa4ea-e205-a5df-78ea-7c2ade523fd8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE0C:15C049:F814F:1436AF:6991D06D |
| html-safe-nonce | 5e352735b8d18b5a7b620679c68e5b39290d691912c24fed3ce776c23b3f6aa4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTBDOjE1QzA0OTpGODE0RjoxNDM2QUY6Njk5MUQwNkQiLCJ2aXNpdG9yX2lkIjoiODE3OTk0MzY1MTQxOTQ3NjA3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f1cd3938c2ce9a5efd21280cafee8a46fbb019c2a59ab1665af7eedcba23996d |
| hovercard-subject-tag | issue:851643089 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hyperstack-org/hyperstack/401/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0b47edd42986f50b99884731649ed801906e59dade29045a0e6a13e835a561f1/hyperstack-org/hyperstack/issues/401 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0b47edd42986f50b99884731649ed801906e59dade29045a0e6a13e835a561f1/hyperstack-org/hyperstack/issues/401 |
| og:image:alt | The receives method can be used as a class method or an instance method, but not as singleton method on the class: class SomeComponent < HyperComponent after_mount do receives(SomeOperation) { ...s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | catmando |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/hyperstack-org/hyperstack git https://github.com/hyperstack-org/hyperstack.git |
| octolytics-dimension-user_id | 34562730 |
| octolytics-dimension-user_login | hyperstack-org |
| octolytics-dimension-repository_id | 145879576 |
| octolytics-dimension-repository_nwo | hyperstack-org/hyperstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145879576 |
| octolytics-dimension-repository_network_root_nwo | hyperstack-org/hyperstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width