Class: Mingle::MingleNamespace
- Inherits:
-
BitGirderClass
- Object
- BitGirderClass
- Mingle::MingleNamespace
- Includes:
- StringParser
- Defined in:
- lib/mingle.rb
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #external_form ⇒ Object (also: #to_s)
- #format(id_styl) ⇒ Object
- #hash ⇒ Object
- #inspect ⇒ Object
Methods included from StringParser
Class Method Details
.create(opts) ⇒ Object
1807 1808 1809 |
# File 'lib/mingle.rb', line 1807 def self.create( opts ) self.send( :new, opts ) end |
.impl_parse(s) ⇒ Object
1811 1812 1813 |
# File 'lib/mingle.rb', line 1811 def self.impl_parse( s ) MingleParser.consume_string( s ) { |p| p.expect_namespace } end |
Instance Method Details
#==(other) ⇒ Object
1835 1836 1837 1838 |
# File 'lib/mingle.rb', line 1835 def ==( other ) other.is_a?( MingleNamespace ) && other.parts == @parts && other.version == @version end |
#eql?(other) ⇒ Boolean
1846 1847 1848 |
# File 'lib/mingle.rb', line 1846 def eql?( other ) self == other end |
#external_form ⇒ Object Also known as: to_s
1823 1824 1825 |
# File 'lib/mingle.rb', line 1823 def external_form format( ID_STYLE_LC_CAMEL_CAPPED ) end |
#format(id_styl) ⇒ Object
1816 1817 1818 1819 1820 |
# File 'lib/mingle.rb', line 1816 def format( id_styl ) parts = @parts.map { |p| p.format( id_styl ) } ver = @version.format( id_styl ) "#{parts.join( ":" )}@#{ver}" end |
#hash ⇒ Object
1841 1842 1843 |
# File 'lib/mingle.rb', line 1841 def hash @parts.hash | @version.hash end |
#inspect ⇒ Object
1830 1831 1832 |
# File 'lib/mingle.rb', line 1830 def inspect to_s.inspect end |