Class: Abt::Ari

Inherits:
Object
  • Object
show all
Defined in:
lib/abt/ari.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scheme: nil, path: nil, flags: []) ⇒ Ari

Returns a new instance of Ari.



7
8
9
10
11
# File 'lib/abt/ari.rb', line 7

def initialize(scheme: nil, path: nil, flags: [])
  @scheme = scheme
  @path = path
  @flags = flags
end

Instance Attribute Details

#flagsObject (readonly)

Returns the value of attribute flags.



5
6
7
# File 'lib/abt/ari.rb', line 5

def flags
  @flags
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/abt/ari.rb', line 5

def path
  @path
end

#schemeObject (readonly)

Returns the value of attribute scheme.



5
6
7
# File 'lib/abt/ari.rb', line 5

def scheme
  @scheme
end

Instance Method Details

#to_sObject



13
14
15
16
17
18
# File 'lib/abt/ari.rb', line 13

def to_s
  str = scheme
  str += ":#{path}" if path

  [str, *flags].join(" ")
end