Class: RubyCss::Stylesheet
- Inherits:
-
Object
- Object
- RubyCss::Stylesheet
- Defined in:
- lib/ruby_css.rb
Instance Method Summary collapse
-
#initialize(file) ⇒ Stylesheet
constructor
A new instance of Stylesheet.
- #method_missing(method_name, *args, &blk) ⇒ Object
- #to_css ⇒ Object
Constructor Details
#initialize(file) ⇒ Stylesheet
Returns a new instance of Stylesheet.
91 92 93 94 |
# File 'lib/ruby_css.rb', line 91 def initialize(file) @__selectors = [] instance_eval( File.read(file) ) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Method Details
#to_css ⇒ Object
100 101 102 103 104 105 |
# File 'lib/ruby_css.rb', line 100 def to_css puts "\n\n" @__selectors.each do |s| puts s.to_s end end |