Class: Array

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

Instance Method Summary collapse

Instance Method Details

#to_paramsObject



80
81
82
# File 'lib/stackfu.rb', line 80

def to_params 
  self.map { |item| item.to_s.upcase }.join(" ")
end

#to_phraseObject



72
73
74
# File 'lib/stackfu.rb', line 72

def to_phrase
  self.to_sentence(:words_connector => ", ", :last_word_connector => " and ")
end

#to_structsObject



76
77
78
# File 'lib/stackfu.rb', line 76

def to_structs
  self.map { |hash| OpenStruct.new(hash) }
end