Class: Enterprisifier::Marshalling::Namespace
- Inherits:
-
Object
- Object
- Enterprisifier::Marshalling::Namespace
- Defined in:
- lib/enterprisifier/marshalling/namespace.rb
Instance Attribute Summary collapse
-
#short_name ⇒ Object
readonly
Returns the value of attribute short_name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #==(other_ns) ⇒ Object
- #hash ⇒ Object
-
#initialize(short_name, url) ⇒ Namespace
constructor
A new instance of Namespace.
- #is?(short_name_or_url) ⇒ Boolean
Constructor Details
#initialize(short_name, url) ⇒ Namespace
Returns a new instance of Namespace.
6 7 8 |
# File 'lib/enterprisifier/marshalling/namespace.rb', line 6 def initialize(short_name, url) @short_name, @url = short_name, url end |
Instance Attribute Details
#short_name ⇒ Object (readonly)
Returns the value of attribute short_name.
4 5 6 |
# File 'lib/enterprisifier/marshalling/namespace.rb', line 4 def short_name @short_name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/enterprisifier/marshalling/namespace.rb', line 4 def url @url end |
Instance Method Details
#==(other_ns) ⇒ Object
10 11 12 |
# File 'lib/enterprisifier/marshalling/namespace.rb', line 10 def ==(other_ns) other_ns.url == url end |
#hash ⇒ Object
14 15 16 |
# File 'lib/enterprisifier/marshalling/namespace.rb', line 14 def hash url.hash end |
#is?(short_name_or_url) ⇒ Boolean
18 19 20 |
# File 'lib/enterprisifier/marshalling/namespace.rb', line 18 def is?(short_name_or_url) @short_name == short_name_or_url || @url == short_name_or_url end |