This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #-sinatra server | |
| # -spotify module | |
| # -spotify gem | |
| # -attributes and methods: search, play | |
| # -playlister object | |
| # -include/extend spotify module | |
| # -creates song objects from the spotify search data | |
| # -methods: sort, list, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test(cat) | |
| cat.map(&:name) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fav_cat_names.map do |name| | |
| break if name == "Johnny Cochran" | |
| name | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chosen_names = [] | |
| fav_cat_names.each do |name| | |
| break if name == "Johnny Cochran" | |
| chosen_names << name | |
| end | |
| chosen_names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def return_nokogiri_table_rows(noko_obj) | |
| noko_obj.xpath('/html/body/table/tbody/tr/td/table[3]/tbody/tr[4]/td[2]/table/tbody/tr/td') | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def return_nokogiri_table_rows(noko_obj) | |
| noko_obj.xpath('/html/body/table/tr/td/table[3]/tr[4]/td[2]/table/tr/td') | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| puts noko_obj.to_html['tbody'] | |
| #=> nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module SlimySlug | |
| extend ActiveSupport::Concern | |
| included do | |
| before_save :set_slug | |
| end | |
| def set_slug | |
| self.slug = self.name.downcase.gsub('.','').gsub(' ','-') | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module SlimySlug | |
| extend ActiveSupport::Concern | |
| included do | |
| before_save :set_slug | |
| has_many :actions | |
| has_many :lobbyists, through: :actions | |
| has_many :clients, through: :actions | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
| <script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
| <script src="http://static.tumblr.com/eojssfq/QG5m6cm3z/embedgist.js"></script> |