Class: FiverrCopy::Recipe
- Inherits:
-
Object
- Object
- FiverrCopy::Recipe
- Defined in:
- lib/fiverr_copy/recipe.rb
Instance Attribute Summary collapse
-
#chunk_size ⇒ Object
Returns the value of attribute chunk_size.
-
#clients ⇒ Object
Returns the value of attribute clients.
-
#description ⇒ Object
Returns the value of attribute description.
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#gem_installation_auth ⇒ Object
Returns the value of attribute gem_installation_auth.
-
#initialized_clients ⇒ Object
readonly
Returns the value of attribute initialized_clients.
-
#manual ⇒ Object
Returns the value of attribute manual.
-
#name ⇒ Object
Returns the value of attribute name.
-
#port ⇒ Object
Returns the value of attribute port.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(name = nil, description = "A FiverrCopy Recipe") {|_self| ... } ⇒ Recipe
constructor
A new instance of Recipe.
- #manual_client_activation? ⇒ Boolean
Constructor Details
#initialize(name = nil, description = "A FiverrCopy Recipe") {|_self| ... } ⇒ Recipe
Returns a new instance of Recipe.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fiverr_copy/recipe.rb', line 14 def initialize(name = nil, description = "A FiverrCopy Recipe", &block) raise "Please specifiy a name for a Recipe" if name.nil? self.name = name self.description = description self.port = 1234 self.chunk_size = 1024 self.manual = false self.gem_installation_auth = "" @initialized_clients = [] yield(self) self end |
Instance Attribute Details
#chunk_size ⇒ Object
Returns the value of attribute chunk_size.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def chunk_size @chunk_size end |
#clients ⇒ Object
Returns the value of attribute clients.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def clients @clients end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def description @description end |
#filter ⇒ Object
Returns the value of attribute filter.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def filter @filter end |
#gem_installation_auth ⇒ Object
Returns the value of attribute gem_installation_auth.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def gem_installation_auth @gem_installation_auth end |
#initialized_clients ⇒ Object (readonly)
Returns the value of attribute initialized_clients.
12 13 14 |
# File 'lib/fiverr_copy/recipe.rb', line 12 def initialized_clients @initialized_clients end |
#manual ⇒ Object
Returns the value of attribute manual.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def manual @manual end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def port @port end |
#username ⇒ Object
Returns the value of attribute username.
2 3 4 |
# File 'lib/fiverr_copy/recipe.rb', line 2 def username @username end |
Instance Method Details
#info ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/fiverr_copy/recipe.rb', line 44 def info puts "Recipe: #{self.name}" puts "---------------------" puts self.description puts puts "Filter : #{self.filter}" puts "Clients : #{self.initialized_clients.size}" puts "Port : #{self.port}" puts "Chunk : #{self.chunk_size}" puts "Manual : #{self.manual_client_activation?}" puts "---------------------" end |
#manual_client_activation? ⇒ Boolean
27 28 29 |
# File 'lib/fiverr_copy/recipe.rb', line 27 def manual_client_activation? self.manual == true end |