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.



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

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

Instance Method Details

#typeObject



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

def type
  self.keys.first
end

#widthObject



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

def width
  self.values.first
end