Class: Esirb::Path
- Inherits:
-
Object
- Object
- Esirb::Path
- Defined in:
- lib/esirb/path.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(client: nil) ⇒ Path
constructor
A new instance of Path.
- #method_missing(m, *args, &block) ⇒ Object
Constructor Details
#initialize(client: nil) ⇒ Path
Returns a new instance of Path.
7 8 9 10 |
# File 'lib/esirb/path.rb', line 7 def initialize(client: nil) @client = client @string = "" end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/esirb/path.rb', line 22 def method_missing(m, *args, &block) @string += "/#{m}" args.each do |arg| @string += "/#{arg}" end self end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/esirb/path.rb', line 5 def client @client end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
5 6 7 |
# File 'lib/esirb/path.rb', line 5 def string @string end |