Class: Maker::Commands::Register
- Inherits:
-
Object
- Object
- Maker::Commands::Register
- Defined in:
- lib/maker/commands/register.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize(args, options) ⇒ Register
constructor
A new instance of Register.
- #run ⇒ Object
- #server ⇒ Object
Constructor Details
#initialize(args, options) ⇒ Register
Returns a new instance of Register.
6 7 8 9 |
# File 'lib/maker/commands/register.rb', line 6 def initialize(args, ) @email = args.first run end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/maker/commands/register.rb', line 4 def email @email end |
Instance Method Details
#client ⇒ Object
21 22 23 |
# File 'lib/maker/commands/register.rb', line 21 def client @client ||= Client.new end |
#run ⇒ Object
11 12 13 14 15 |
# File 'lib/maker/commands/register.rb', line 11 def run student = server.student client.save(student) end |