Class: LearnHello::Greeting

Inherits:
Object
  • Object
show all
Defined in:
lib/learn_hello/greeting.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGreeting

Returns a new instance of Greeting.



6
7
8
9
# File 'lib/learn_hello/greeting.rb', line 6

def initialize
  , token = Netrc.read['learn-config']
  @client       = LearnWeb::Client.new(token: token)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/learn_hello/greeting.rb', line 3

def client
  @client
end

#resultObject

Returns the value of attribute result.



4
5
6
# File 'lib/learn_hello/greeting.rb', line 4

def result
  @result
end

Class Method Details

.executeObject



11
12
13
# File 'lib/learn_hello/greeting.rb', line 11

def self.execute
  new.execute
end

Instance Method Details

#executeObject



15
16
17
18
# File 'lib/learn_hello/greeting.rb', line 15

def execute
  introduce
  output_result
end