Class: ToBeRead::Property

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

Class Method Summary collapse

Class Method Details

.select(property) ⇒ Object



6
7
8
9
10
# File 'lib/toberead/properties.rb', line 6

def select(property)
  properties = YAML.safe_load(load_template)
  abort("Unknown property: #{property}") unless properties.key? property.to_s
  properties[property.to_s].sample
end