Class: TwitterHashtag::CLI
- Inherits:
-
Object
- Object
- TwitterHashtag::CLI
- Defined in:
- lib/twitter_hashtag/cli.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#hashtag ⇒ Object
readonly
Returns the value of attribute hashtag.
Instance Method Summary collapse
-
#initialize(hashtag, args) ⇒ CLI
constructor
A new instance of CLI.
- #process ⇒ Object
Constructor Details
#initialize(hashtag, args) ⇒ CLI
Returns a new instance of CLI.
8 9 10 11 |
# File 'lib/twitter_hashtag/cli.rb', line 8 def initialize(hashtag, args) @hashtag = hashtag @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
13 14 15 |
# File 'lib/twitter_hashtag/cli.rb', line 13 def args @args end |
#hashtag ⇒ Object (readonly)
Returns the value of attribute hashtag.
13 14 15 |
# File 'lib/twitter_hashtag/cli.rb', line 13 def hashtag @hashtag end |
Instance Method Details
#process ⇒ Object
15 16 17 |
# File 'lib/twitter_hashtag/cli.rb', line 15 def process hashtag == 'help' ? render_help : search end |