Class: Riddl::Wrapper::Declaration::Interface
- Inherits:
-
Object
- Object
- Riddl::Wrapper::Declaration::Interface
- Defined in:
- lib/ruby/riddl/wrapper/declaration/interface.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#des ⇒ Object
readonly
Returns the value of attribute des.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#sub ⇒ Object
readonly
Returns the value of attribute sub.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, top, base, sub, des) ⇒ Interface
constructor
A new instance of Interface.
- #real_path(real) ⇒ Object
- #real_url(real, base) ⇒ Object
Constructor Details
#initialize(name, top, base, sub, des) ⇒ Interface
Returns a new instance of Interface.
6 7 8 9 10 11 12 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 6 def initialize(name,top,base,sub,des) @name = name @top = top @base = base @sub = sub @des = des end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
29 30 31 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 29 def base @base end |
#des ⇒ Object (readonly)
Returns the value of attribute des.
29 30 31 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 29 def des @des end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
29 30 31 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 29 def name @name end |
#sub ⇒ Object (readonly)
Returns the value of attribute sub.
29 30 31 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 29 def sub @sub end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
29 30 31 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 29 def top @top end |
Class Method Details
Instance Method Details
#real_path(real) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 18 def real_path(real) t = @top.split('/') real = real.split('/') real = real[t.length..-1] real.join('/') end |
#real_url(real, base) ⇒ Object
25 26 27 |
# File 'lib/ruby/riddl/wrapper/declaration/interface.rb', line 25 def real_url(real,base) (@base == '' ? base : @base) + real_path(real) end |