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

Constructor Details

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

Returns a new instance of Print.



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

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

Instance Attribute Details

#outObject (readonly)

Returns the value of attribute out.



12
13
14
# File 'lib/convenient_service/examples/standard/v1/cowsay/services/print.rb', line 12

def out
  @out
end

#textObject (readonly)

Returns the value of attribute text.



12
13
14
# File 'lib/convenient_service/examples/standard/v1/cowsay/services/print.rb', line 12

def text
  @text
end

Instance Method Details

#resultObject



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

def result
  out.puts cloud + cow

  success
end