Class: Troo::Commands::ShowComments
- Inherits:
-
Object
- Object
- Troo::Commands::ShowComments
- Defined in:
- lib/troo/cli/commands/show/show_comments.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id = nil) ⇒ Object
constructor
[].
-
#render ⇒ Object
[].
Constructor Details
#initialize(id = nil) ⇒ Object
Returns [].
16 17 18 |
# File 'lib/troo/cli/commands/show/show_comments.rb', line 16 def initialize(id = nil) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/troo/cli/commands/show/show_comments.rb', line 4 def id @id end |
Class Method Details
.dispatch(id = nil) ⇒ Object
Returns [].
9 10 11 |
# File 'lib/troo/cli/commands/show/show_comments.rb', line 9 def dispatch(id = nil) new(id).render end |
Instance Method Details
#render ⇒ Object
Returns [].
21 22 23 24 25 26 27 28 29 |
# File 'lib/troo/cli/commands/show/show_comments.rb', line 21 def render if resource presenter elsif no_default? [error, no_default].join(' ') else error end end |