Class: Curlify
- Inherits:
-
Object
- Object
- Curlify
- Defined in:
- lib/curlify.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(request) ⇒ Curlify
constructor
A new instance of Curlify.
- #to_curl ⇒ Object
Constructor Details
#initialize(request) ⇒ Curlify
Returns a new instance of Curlify.
10 11 12 13 14 15 16 17 |
# File 'lib/curlify.rb', line 10 def initialize(request) @request = request Settings.call.each do |key, value| instance_variable_set("@#{key}", value) define_singleton_method(key) { instance_variable_get("@#{key}") } end end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
8 9 10 |
# File 'lib/curlify.rb', line 8 def request @request end |
Instance Method Details
#to_curl ⇒ Object
19 20 21 22 23 |
# File 'lib/curlify.rb', line 19 def to_curl command = build_curl_command copy_to_clipboard(command) command end |