class UserRegistrationService
class Result
attr_reader :user, :errors
def initialize(success:, user: nil, errors: [])
@success = success
import { ReactNode } from 'react'
interface CardProps {
children: ReactNode
className?: string
}
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["input", "results"]
static outlets = ["results-list"]
static values = {
INSTALLED_APPS += ['tenant_schemas']
DATABASE_ROUTERS = ['tenant_schemas.routers.TenantSyncRouter']
MIDDLEWARE = [
'tenant_schemas.middleware.TenantMiddleware',
import SwiftUI
struct PostDetailView: View {
@StateObject private var viewModel: PostDetailViewModel
init(postId: Int) {
class CreatePostService
def initialize(author:, params:)
@author = author
@params = params
end
class ApplicationCommand
Result = Struct.new(:value, :errors) do
def success?
errors.nil? || errors.empty?
end
import UIKit
protocol Coordinator: AnyObject {
var navigationController: UINavigationController { get set }
var childCoordinators: [Coordinator] { get set }
from dataclasses import dataclass, field
from datetime import datetime, timezone
from decimal import Decimal
def _now():
module DomainEvents
class Registry
def initialize
@subscribers = Hash.new { |h, k| h[k] = [] }
end
package com.example.myapp.ui.detail
import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel
class ButtonComponent < ViewComponent::Base
VARIANTS = {
primary: "bg-blue-600 hover:bg-blue-700 text-white",
secondary: "bg-gray-200 hover:bg-gray-300 text-gray-900",
danger: "bg-red-600 hover:bg-red-700 text-white"
}.freeze