Class: Ravvi::Format

Inherits:
Struct
  • Object
show all
Defined in:
lib/ravvi.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



9
10
11
# File 'lib/ravvi.rb', line 9

def height
  @height
end

#max_secondsObject

Returns the value of attribute max_seconds

Returns:

  • (Object)

    the current value of max_seconds



9
10
11
# File 'lib/ravvi.rb', line 9

def max_seconds
  @max_seconds
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/ravvi.rb', line 9

def name
  @name
end

#platformObject

Returns the value of attribute platform

Returns:

  • (Object)

    the current value of platform



9
10
11
# File 'lib/ravvi.rb', line 9

def platform
  @platform
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



9
10
11
# File 'lib/ravvi.rb', line 9

def width
  @width
end

Instance Method Details

#aspectObject



10
11
12
13
# File 'lib/ravvi.rb', line 10

def aspect
  g = width.gcd(height)
  "#{width / g}:#{height / g}"
end