Class: Twitterscraper::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/twitterscraper/type.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Type

Returns a new instance of Type.



3
4
5
# File 'lib/twitterscraper/type.rb', line 3

def initialize(value)
  @value = value
end

Instance Method Details

#search?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/twitterscraper/type.rb', line 7

def search?
  @value == 'search'
end

#to_sObject



15
16
17
# File 'lib/twitterscraper/type.rb', line 15

def to_s
  @value
end

#user?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/twitterscraper/type.rb', line 11

def user?
  @value == 'user'
end