Class: ConvenientService::Examples::Standard::V1::Cowsay::Services::Print

Inherits:
Object
  • Object
show all
Includes:
Service::Configs::Standard::V1
Defined in:
lib/convenient_service/examples/standard/v1/cowsay/services/print.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Config

included

Constructor Details

#initialize(text: "Hello World!", out: $stdout) ⇒ Print

Returns a new instance of Print.



23
24
25
26
# File 'lib/convenient_service/examples/standard/v1/cowsay/services/print.rb', line 23

def initialize(text: "Hello World!", out: $stdout)
  @text = text
  @out = out
end

Instance Attribute Details

#outObject (readonly)

Returns the value of attribute out.



17
18
19
# File 'lib/convenient_service/examples/standard/v1/cowsay/services/print.rb', line 17

def out
  @out
end

#textObject (readonly)

Returns the value of attribute text.



17
18
19
# File 'lib/convenient_service/examples/standard/v1/cowsay/services/print.rb', line 17

def text
  @text
end

Instance Method Details

#resultObject



28
29
30
31
32
# File 'lib/convenient_service/examples/standard/v1/cowsay/services/print.rb', line 28

def result
  out.puts cloud + cow

  success
end