Class: Hyrum::Generators::FakeGenerator
- Inherits:
-
Object
- Object
- Hyrum::Generators::FakeGenerator
- Defined in:
- lib/hyrum/generators/fake_generator.rb
Constant Summary collapse
- FAKE_MESSAGES =
%( { "e404": [ "We couldn't locate the resource you were looking for.", "The resource you requested is not available at this time.", "Unfortunately, we were unable to find the specified resource.", "It seems the resource you're searching for does not exist.", "The item you are trying to access is currently missing." ], "e418": [ "I'm a teapot", "The server refuses the attempt to brew coffee with a teapot", "Coffee brewing denied: a teapot is not suitable for this operation.", "Request failed: the server cannot process coffee with a teapot.", "Brewing error: teapots are incompatible with coffee preparation.", "Action halted: using a teapot to brew coffee is not permitted.", "Invalid request: please use a coffee maker instead of a teapot." ], "e500": [ "Internal Server Error", "An unexpected condition was encountered" ], "e503": [ "Service Unavailable", "The server is currently unavailable" ], "e504": [ "Gateway Timeout", "The server is currently unavailable" ] } )
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(options) ⇒ FakeGenerator
constructor
A new instance of FakeGenerator.
Constructor Details
#initialize(options) ⇒ FakeGenerator
Returns a new instance of FakeGenerator.
41 42 43 44 |
# File 'lib/hyrum/generators/fake_generator.rb', line 41 def initialize() @options = # @ai_service = options[:ai_service] end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
39 40 41 |
# File 'lib/hyrum/generators/fake_generator.rb', line 39 def @options end |
Instance Method Details
#generate ⇒ Object
46 47 48 |
# File 'lib/hyrum/generators/fake_generator.rb', line 46 def generate JSON.parse(FAKE_MESSAGES) end |