Module: HouseAccount
- Defined in:
- lib/houseaccount.rb,
lib/houseaccount/copy.rb,
lib/houseaccount/down.rb,
lib/houseaccount/marks.rb,
lib/houseaccount/engine.rb,
lib/houseaccount/helpers.rb,
lib/houseaccount/version.rb,
lib/houseaccount/helpers/flows.rb,
lib/houseaccount/helpers/heads.rb,
lib/houseaccount/helpers/logos.rb
Overview
HouseAccount's front end: the stylesheet and script every page loads — bh's Bootstrap 6 with the house's own layer over it — the marks every app is known by, and the helpers that draw a head, a logo or a signup page the same way everywhere.
Defined Under Namespace
Modules: Helpers Classes: Copy, Down, Engine
Constant Summary collapse
- FormBuilder =
The form every HouseAccount page is written with, which is bh's: the house dresses no field differently, so this name and
Bh::FormBuilderare one builder. Bh::FormBuilder
- Message =
One message of a chat, which is bh's too. Named here for a host that reached for it by the house's name before the components moved.
Bh::Message
- MARKS =
How each app's mark sits beside its name in a lockup, measured at 48px: the box the drawing is rendered at, and how far down it is pushed so its ink stands on the baseline and reaches Quicksand's ascender. Every drawing is a different shape inside its 512 grid, so equal sizes never align; these do.
{ autopilot: [46.36, 5.42], design: [50.47, 8.94], fountain: [39.54, 2.01], goldrush: [49.50, 11.02], houseaccount: [38.96, 1.72], houston: [39.73, 2.11], }.freeze
- VERSION =
Version of the gem, read by the gemspec and by hosts checking compatibility.
'0.19.1'
Class Method Summary collapse
-
.app ⇒ Object
Which of the family this host is, read off the Rails application's own name — the
GoldrushofGoldrush::Application— and the house itself for any app not inMARKS. -
.one_time_code(pin, host: Rails.application.default_url_options[:host]) ⇒ Object
The words that carry a 6-digit code to a phone, in both voices.
Class Method Details
.app ⇒ Object
Which of the family this host is, read off the Rails application's own name — the
Goldrush of Goldrush::Application — and the house itself for any app not in MARKS.
What a tab wears, what a logo says and whose page answers /down.html.
24 25 26 27 |
# File 'lib/houseaccount.rb', line 24 def self.app name = Rails.application.class.module_parent_name.downcase.to_sym MARKS.key?(name) ? name : :houseaccount end |
.one_time_code(pin, host: Rails.application.default_url_options[:host]) ⇒ Object
The words that carry a 6-digit code to a phone, in both voices. written is the sentence
a person reads and, under it, the line Safari matches against the page about to be filled,
@host #code, which offers the code above the keyboard so nobody leaves for Messages to
copy it. spoken is the sentence alone, its digits one at a time so a listener can write
them down, and without a line meant for a phone rather than a person. Every app of the
house that sends a code sends these, from config/locales.
35 36 37 38 |
# File 'lib/houseaccount.rb', line 35 def self.one_time_code(pin, host: Rails.application.[:host]) Copy.new written: I18n.t('houseaccount.one_time_code', pin:, host:), spoken: I18n.t('houseaccount.spoken_one_time_code', pin: pin.chars.join(', ')) end |