Class: Maker::Client
- Inherits:
-
Object
- Object
- Maker::Client
- Defined in:
- lib/maker/client.rb
Constant Summary collapse
- FILE_NAME =
'./.maker'
Instance Method Summary collapse
Instance Method Details
#data ⇒ Object
12 13 14 |
# File 'lib/maker/client.rb', line 12 def data @data ||= load_data end |
#fields ⇒ Object
20 21 22 |
# File 'lib/maker/client.rb', line 20 def fields data[data.keys.first] || {} end |
#registered? ⇒ Boolean
16 17 18 |
# File 'lib/maker/client.rb', line 16 def registered? !!fields['email'] end |
#save(data) ⇒ Object
7 8 9 10 |
# File 'lib/maker/client.rb', line 7 def save(data) File.write(FILE_NAME, data.to_yaml) @data = nil end |