Class: Crest::Config
- Inherits:
-
Object
- Object
- Crest::Config
- Defined in:
- lib/crest/config.rb
Overview
Every fact about the app a card is handed out by, so none of the gem's own classes names one. A host states each as a value or as something callable, and a callable is asked every time a card is drawn: an app reading its number out of the environment differs between production and staging, and one read at boot would be wrong in one of them until a restart.
Instance Attribute Summary collapse
-
#email ⇒ String
Address somebody may write back to, left out of the card where unset.
-
#name ⇒ String
Name the card is saved under, which the gem cannot invent.
-
#org ⇒ String
Organization the name stands for, left out of the card where unset.
-
#phone ⇒ String
Number a text of ours arrives from, which the gem cannot invent.
-
#photo ⇒ String, Pathname
Picture the card carries, left out of the card where unset.
-
#url ⇒ String
Address of the site behind the name, left out of the card where unset.
Instance Attribute Details
#email ⇒ String
Returns address somebody may write back to, left out of the card where unset.
22 |
# File 'lib/crest/config.rb', line 22 def email = resolve @email |
#name ⇒ String
Returns name the card is saved under, which the gem cannot invent.
13 |
# File 'lib/crest/config.rb', line 13 def name = resolve(@name) || missing('name') |
#org ⇒ String
Returns organization the name stands for, left out of the card where unset.
25 |
# File 'lib/crest/config.rb', line 25 def org = resolve @org |
#phone ⇒ String
Returns number a text of ours arrives from, which the gem cannot invent.
16 |
# File 'lib/crest/config.rb', line 16 def phone = resolve(@phone) || missing('phone') |
#photo ⇒ String, Pathname
Returns picture the card carries, left out of the card where unset.
28 |
# File 'lib/crest/config.rb', line 28 def photo = resolve @photo |
#url ⇒ String
Returns address of the site behind the name, left out of the card where unset.
19 |
# File 'lib/crest/config.rb', line 19 def url = resolve @url |