Class: RocketFuel::CommandLineIcon
- Inherits:
-
Object
- Object
- RocketFuel::CommandLineIcon
- Defined in:
- lib/rocket_fuel/command_line_icon.rb
Instance Method Summary collapse
-
#fallback? ⇒ Boolean
we must handle for ruby 1.8 without iconv.
-
#initialize(icon, fallback = '') ⇒ CommandLineIcon
constructor
A new instance of CommandLineIcon.
- #render ⇒ Object
Constructor Details
#initialize(icon, fallback = '') ⇒ CommandLineIcon
Returns a new instance of CommandLineIcon.
3 4 5 |
# File 'lib/rocket_fuel/command_line_icon.rb', line 3 def initialize(icon, fallback = '') @icon, @fallback = icon, fallback end |
Instance Method Details
#fallback? ⇒ Boolean
we must handle for ruby 1.8 without iconv
12 13 14 |
# File 'lib/rocket_fuel/command_line_icon.rb', line 12 def fallback? !@icon.respond_to?(:encode) end |
#render ⇒ Object
7 8 9 |
# File 'lib/rocket_fuel/command_line_icon.rb', line 7 def render fallback? ? @fallback : @icon end |