Module: Crest
- Defined in:
- lib/crest.rb,
lib/crest/card.rb,
lib/crest/error.rb,
lib/crest/photo.rb,
lib/crest/config.rb,
lib/crest/routes.rb,
lib/crest/railtie.rb,
lib/crest/version.rb,
lib/crest/cards_controller.rb
Overview
A contact card an app hands out, so a text from an unknown number arrives under a name.
Defined Under Namespace
Modules: Routes Classes: Card, CardsController, Config, Error, Photo, Railtie
Constant Summary collapse
- VERSION =
The version of this gem, as RubyGems knows it.
'1.0.1'
Class Method Summary collapse
-
.card ⇒ Crest::Card
Built afresh for every request, since a setting stated as a callable is asked each time.
-
.config ⇒ Crest::Config
Everything a card has to be told about the app around it.
-
.configure {|config| ... } ⇒ void
Yields the configuration, so a host states its own facts in one initializer.
Class Method Details
.card ⇒ Crest::Card
Built afresh for every request, since a setting stated as a callable is asked each time.
20 21 22 23 |
# File 'lib/crest.rb', line 20 def self.card Card.new name: config.name, phone: config.phone, url: config.url, email: config.email, org: config.org, photo: config.photo end |
.config ⇒ Crest::Config
Returns everything a card has to be told about the app around it.
12 |
# File 'lib/crest.rb', line 12 def self.config = @config ||= Config.new |
.configure {|config| ... } ⇒ void
This method returns an undefined value.
Yields the configuration, so a host states its own facts in one initializer.
16 |
# File 'lib/crest.rb', line 16 def self.configure = yield config |