Class: Atlasq::Command::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/atlasq/command/base.rb

Direct Known Subclasses

Any, Country, Help, Language, Money, Region, Usage, Version

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(search_terms) ⇒ Base

Returns a new instance of Base.

Parameters:

  • search_terms (Array<String>)


20
21
22
# File 'lib/atlasq/command/base.rb', line 20

def initialize(search_terms)
  @search_terms = search_terms.map(&Util::String.method(:normalize))
end

Instance Attribute Details

#search_termsObject (readonly)

Returns the value of attribute search_terms.



6
7
8
# File 'lib/atlasq/command/base.rb', line 6

def search_terms
  @search_terms
end

Class Method Details

.run(terms) ⇒ String

Parameters:

  • term (Array<String>)

Returns:

  • (String)


10
11
12
# File 'lib/atlasq/command/base.rb', line 10

def self.run(terms)
  new(terms).content
end

.to_pager?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/atlasq/command/base.rb', line 15

def self.to_pager?
  true
end

Instance Method Details

#contentString

Returns:

  • (String)


25
26
27
# File 'lib/atlasq/command/base.rb', line 25

def content
  NotImplementedError
end