Class: Nineteen::Eighty::Two::Span

Inherits:
Hash
  • Object
show all
Defined in:
lib/nineteen/eighty/two.rb

Instance Method Summary collapse

Constructor Details

#initialize(type, width) ⇒ Span

Returns a new instance of Span.



23
24
25
# File 'lib/nineteen/eighty/two.rb', line 23

def initialize type, width
  self[type] = width
end

Instance Method Details

#typeObject



27
28
29
# File 'lib/nineteen/eighty/two.rb', line 27

def type
  self.keys.first
end

#widthObject



31
32
33
# File 'lib/nineteen/eighty/two.rb', line 31

def width
  self.values.first
end