Class: LearnHello::Greeting
- Inherits:
-
Object
- Object
- LearnHello::Greeting
- Defined in:
- lib/learn_hello/greeting.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#result ⇒ Object
Returns the value of attribute result.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ Greeting
constructor
A new instance of Greeting.
Constructor Details
#initialize ⇒ Greeting
Returns a new instance of Greeting.
6 7 8 9 |
# File 'lib/learn_hello/greeting.rb', line 6 def initialize _login, token = Netrc.read['learn-config'] @client = LearnWeb::Client.new(token: token) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/learn_hello/greeting.rb', line 3 def client @client end |
#result ⇒ Object
Returns the value of attribute result.
4 5 6 |
# File 'lib/learn_hello/greeting.rb', line 4 def result @result end |
Class Method Details
.execute ⇒ Object
11 12 13 |
# File 'lib/learn_hello/greeting.rb', line 11 def self.execute new.execute end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 |
# File 'lib/learn_hello/greeting.rb', line 15 def execute introduce output_result end |