Class: ConvenientService::Examples::Standard::Cowsay::Services::Print
- Inherits:
-
Object
- Object
- ConvenientService::Examples::Standard::Cowsay::Services::Print
- Includes:
- Service::Configs::Standard
- Defined in:
- lib/convenient_service/examples/standard/cowsay/services/print.rb
Instance Attribute Summary collapse
-
#out ⇒ Object
readonly
Returns the value of attribute out.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text: "Hello World!", out: $stdout) ⇒ Print
constructor
A new instance of Print.
- #result ⇒ Object
Methods included from Service::Configs::Standard
Methods included from Config
Constructor Details
#initialize(text: "Hello World!", out: $stdout) ⇒ Print
Returns a new instance of Print.
22 23 24 25 |
# File 'lib/convenient_service/examples/standard/cowsay/services/print.rb', line 22 def initialize(text: "Hello World!", out: $stdout) @text = text @out = out end |
Instance Attribute Details
#out ⇒ Object (readonly)
Returns the value of attribute out.
16 17 18 |
# File 'lib/convenient_service/examples/standard/cowsay/services/print.rb', line 16 def out @out end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
16 17 18 |
# File 'lib/convenient_service/examples/standard/cowsay/services/print.rb', line 16 def text @text end |
Instance Method Details
#result ⇒ Object
27 28 29 30 31 |
# File 'lib/convenient_service/examples/standard/cowsay/services/print.rb', line 27 def result out.puts cloud + cow success end |